Signals
Asynchronous notifications delivered to a process. SIGINT (Ctrl+C), SIGTERM (polite kill), SIGKILL (unblockable kill), SIGSEGV (segfault), SIGPIPE (write to closed pipe). signal() or sigaction() installs a handler function. Signal handlers are severely constrained: only async-signal-safe functions are allowed (no malloc, no printf). Common pattern: handler sets a volatile sig_atomic_t flag, main loop checks it. sigprocmask() blocks/unblocks signals. Signals interact poorly with threads — prefer condition variables for inter-thread communication.