signals
POSIX Signals
Standard signals sent to processes on POSIX-compliant systems (Linux, macOS, BSD). Signal numbers shown are for Linux; BSD/macOS may differ for signals 16–31.
36 codes
references pubs.opengroup.org/onlinepubs/9699919799/basedefs/signal.h.htmlman7.org/linux/man-pages/man7/signal.7.html
· All codes 36 codes
- SIGABRT Abort Sent by a process to itself via abort(3) to indicate an abnormal termination condition. Produces a core dump by default. Used by C runtime assertions on failure.
- SIGALRM Alarm clock Sent when a timer set by alarm(2) or setitimer(2) expires. Used to implement timeouts in applications.
- SIGBUS Bus error Raised when a process accesses memory that the hardware cannot address, typically due to an unaligned memory access or accessing memory-mapped hardware beyond its extent.
- SIGCHLD Child stopped or terminated Sent to a parent process when a child process stops, resumes, or terminates. The default action is to ignore it; parents that wish to reap child status typically handle it with waitpid(2).
- SIGCLD Child Status Changed An older SVr4 name for SIGCHLD. On Linux SIGCLD is defined as an alias for SIGCHLD (signal 17) and has identical behaviour: sent to the parent process when a child process changes state (exits, stops, or resumes).
- SIGCONT Continue Resumes a process that has been stopped (e.g. by SIGSTOP or SIGTSTP). Cannot be blocked when a process is stopped. Used by shells to implement job control (the fg command).
- SIGEMT Emulator Trap Sent when an emulator instruction or emulation trap occurs. Present on macOS and BSD systems (signal 7) but not defined on Linux. Historically used to signal emulated instructions on systems running code for a different architecture.
- SIGFPE Floating-point exception Raised on an erroneous arithmetic operation such as integer division by zero or floating-point overflow. Despite the name, it also covers integer arithmetic errors on most platforms.
- SIGHUP Hangup Sent to a process when its controlling terminal is closed or the session leader exits. Commonly used to instruct daemons to reload their configuration without restarting.
- SIGILL Illegal instruction Sent to a process when it attempts to execute an illegal, malformed, or privileged machine instruction. Often indicates a corrupted binary or a compiler bug.
- SIGINFO Status Information Sent to request status information from a process, typically triggered by pressing Ctrl+T in a terminal on macOS and BSD systems. A macOS/BSD-specific signal not available on Linux. Processes commonly respond by printing a brief status summary to standard error.
- SIGINT Interrupt Sent to a process when the user presses Ctrl-C at the terminal. The default action is to terminate the process. Many programs catch it to perform a clean shutdown.
- SIGIO I/O possible Sent when a file descriptor is ready for I/O, used with asynchronous I/O (O_ASYNC). Also known as SIGPOLL on some systems. The default action is to ignore it.
- SIGIOT I/O Trap An older name for SIGABRT, originating from PDP-11 IOT (Input/Output Trap) instructions. On Linux and most modern systems SIGIOT is defined as an alias for SIGABRT (signal 6) and has identical behaviour.
- SIGKILL Kill Immediately terminates a process. Cannot be caught, blocked, or ignored. Use as a last resort after SIGTERM has failed, as it gives the process no chance to clean up.
- SIGPIPE Broken pipe Sent to a process that writes to a pipe or socket with no reader. The default action terminates the process; servers typically ignore it to handle partial client disconnects gracefully.
- SIGPOLL Pollable Event Sent when a pollable event occurs on a file descriptor, such as input becoming available. A POSIX synonym for SIGIO on Linux; on some older SVr4 systems it was a distinct signal. The default action is to terminate the process.
- SIGPROF Profiling timer expired Sent when a profiling timer (counting both user and system CPU time) set by setitimer(2) with ITIMER_PROF expires. Used by profilers like gprof to sample program execution.
- SIGPWR Power failure Linux-specific signal sent by the init/systemd system when a power failure or UPS event is detected. Gives processes a chance to save state before shutdown. Not defined on BSD/macOS.
- SIGQUIT Quit Sent to a process when the user presses Ctrl-\ at the terminal. Like SIGINT but also produces a core dump by default.
- SIGSEGV Segmentation fault Raised when a process makes an invalid memory reference, such as dereferencing a null or dangling pointer, accessing unmapped memory, or writing to a read-only region.
- SIGSTKFLT Stack fault on coprocessor Linux-specific signal originally intended for math coprocessor stack faults. No longer generated by the kernel; retained for historical compatibility. Not defined on BSD/macOS.
- SIGSTOP Stop Pauses a process unconditionally. Cannot be caught, blocked, or ignored. Resume with SIGCONT. Used by debuggers and job control.
- SIGSYS Bad system call Raised when a process makes a system call with an invalid argument or attempts a syscall that is not permitted (e.g. blocked by a seccomp filter). Used by sandboxing mechanisms.
- SIGTERM Termination The standard signal to request graceful termination of a process. Unlike SIGKILL it can be caught and blocked, allowing the process to perform cleanup before exiting. Sent by default when using kill(1) without a signal number.
- SIGTRAP Trace/breakpoint trap Generated by a breakpoint or trace instruction, typically used by debuggers. Also raised on certain processor exceptions.
- SIGTSTP Terminal stop Sent to a process when the user presses Ctrl-Z at the terminal. Unlike SIGSTOP it can be caught or ignored. The default action suspends the process; shells use this for job control.
- SIGTTIN Background read from terminal Sent to a background process that attempts to read from its controlling terminal. The default action suspends the process until it is brought to the foreground.
- SIGTTOU Background write to terminal Sent to a background process that attempts to write to its controlling terminal when the TOSTOP flag is set. The default action suspends the process.
- SIGURG Urgent condition on socket Sent to a process when out-of-band (urgent) data arrives on a socket. The default action is to ignore it.
- SIGUSR1 User-defined signal 1 Application-defined signal with no fixed meaning. Commonly used for custom inter-process communication; the handler is entirely up to the application.
- SIGUSR2 User-defined signal 2 Application-defined signal with no fixed meaning. Used alongside SIGUSR1 for custom inter-process communication; interpretation is left entirely to the application.
- SIGVTALRM Virtual alarm clock Sent when a virtual timer (counting only user-mode CPU time) set by setitimer(2) with ITIMER_VIRTUAL expires. Used for per-process profiling and CPU accounting.
- SIGWINCH Window resize Sent to a process when its controlling terminal changes size. Terminals and TUI applications handle this to redraw their output. The default action is to ignore it.
- SIGXCPU CPU time limit exceeded Sent when a process exceeds its soft CPU time limit set via setrlimit(2). The process may catch this signal to save state before SIGKILL is delivered when the hard limit is reached.
- SIGXFSZ File size limit exceeded Sent when a process attempts to grow a file beyond the maximum file size limit set via setrlimit(2). The default action terminates the process with a core dump.