Unix Signals

Signal numbers, names, default actions, and whether they can be caught.

terminate11 signals
1
SIGHUP
Hangup. Sent when the controlling terminal is closed or the session leader exits. Daemons reload config on SIGHUP by convention.
2
SIGINT
Interrupt. Sent by Ctrl+C. Requests graceful termination of the foreground process.
10
SIGUSR1
User-defined signal 1. No default meaning — applications define their own behavior (e.g., log rotation, reload).
12
SIGUSR2
User-defined signal 2. Companion to SIGUSR1 for applications that need two custom signal types.
13
SIGPIPE
Broken pipe. Sent when a process writes to a pipe or socket with no readers. Default is to terminate silently.
14
SIGALRM
Alarm clock. Sent when a timer set by alarm(2) or setitimer(2) expires. Used to implement timeouts.
15
SIGTERM
Terminate. The standard polite shutdown request. Catchable — programs should clean up and exit gracefully.
26
SIGVTALRM
Virtual timer alarm. Sent when the virtual (user-mode CPU time) timer expires. Used for profiling.
27
SIGPROF
Profiling timer. Sent when the profiling interval timer expires (counts both user and system time).
29
SIGIO
Async I/O event. Sent when a file descriptor is ready for I/O, if the process has requested async notification.
30
SIGPWR
Power failure. Sent by init when the system detects a power failure or battery low condition. Linux-specific.
core11 signals
3
SIGQUIT
Quit. Sent by Ctrl+\. Like SIGINT but also produces a core dump for post-mortem debugging.
4
SIGILL
Illegal instruction. Sent when the CPU encounters an invalid or privileged instruction. Usually a bug or corrupted binary.
5
SIGTRAP
Trace/breakpoint trap. Used by debuggers to intercept execution at breakpoints or after single-step instructions.
6
SIGABRT
Abort. Sent by abort(3) to terminate abnormally. Triggered by failed assert() calls and detected internal errors.
7
SIGBUS
Bus error. Sent on memory access alignment errors or accessing memory outside a mapped region (e.g., past end of mmap).
8
SIGFPE
Floating-point exception. Sent on arithmetic errors: integer divide-by-zero, overflow, invalid operation.
9
SIGKILL
Kill. Unconditional, immediate termination. Cannot be caught, blocked, or ignored. No cleanup possible.
uncatchable
11
SIGSEGV
Segmentation fault. Sent on invalid memory access: null pointer dereference, out-of-bounds write, use-after-free.
24
SIGXCPU
CPU time limit exceeded. Sent when a process exceeds its soft CPU time limit set by setrlimit(RLIMIT_CPU).
25
SIGXFSZ
File size limit exceeded. Sent when a process tries to grow a file beyond the RLIMIT_FSIZE limit.
31
SIGSYS
Bad system call. Sent when a process makes an invalid syscall or passes an invalid argument to a syscall.
stop4 signals
19
SIGSTOP
Stop process. Pauses execution unconditionally. Cannot be caught, blocked, or ignored. Resume with SIGCONT.
uncatchable
20
SIGTSTP
Terminal stop. Sent by Ctrl+Z. Like SIGSTOP but catchable — programs can do cleanup before stopping.
21
SIGTTIN
Background read. Sent to a background process that tries to read from the controlling terminal.
22
SIGTTOU
Background write. Sent to a background process that tries to write to the controlling terminal.
continue1 signal
18
SIGCONT
Continue. Resumes a stopped process. Sent by the shell when you run fg or bg. Cannot be ignored while stopped.
ignore3 signals
17
SIGCHLD
Child state change. Sent to a parent when a child process stops, continues, or terminates. Used by shells to track jobs.
23
SIGURG
Urgent data. Sent when out-of-band data arrives on a socket (TCP URG flag). Rarely used in practice.
28
SIGWINCH
Window resize. Sent when the terminal window size changes. TUI apps (vim, tmux) use this to redraw the screen.