c-signal-handler-safety

Installation
SKILL.md

C Signal Handler Safety

When to use

  • Installing a handler with signal() or sigaction() — SIGINT/SIGTERM shutdown, "set a flag" patterns, watchdog or crash handlers.
  • Code that calls write/_write or sets a flag from a handler, or defers work to a main loop after a signal.
  • Debugging a program that hangs, crashes, or drops data only after Ctrl+C or kill — the classic signal-vs-malloc/stdio deadlock.
  • Reviewing C that intersects with c-errno-and-syscall-returns (EINTR is caused by signals; interrupted syscalls must be retried there).

When not to use

Installs
1
GitHub Stars
2
First Seen
Oct 3, 2026