Linux process signals and their meaning
This article has last been updated at .
Linux uses signals to interact and define the state of a process. It uses POSIX reliable and real-time signals. The first are considered standard signals.
Many programs are build using glibc and therefore use functions like kill(2) to send a signal to a process or processes group, or even all processes on the system. A process can decide to ignore a signal or take an action after it is received by a signal handler, a routine to catch incoming signals.
Signal list
| Signal name | Numeric value | Description |
|---|---|---|
| SIGHUP | 1 | Signal to tell user’s terminal is disconnected. For some processes it reloads configuration |
| SIGINT | 2 | Interrupt, for example when using CTRL+C, usually with proper clean up of system resources, such as temporary files |
| SIGQUIT | 3 | Like SIGINT, but usually with CTRL+, often not doing clean up of resources |
| SIGILL | 4 | Illegal instruction, process performs garbage execution or privileged instruction |
| SIGTRAP | 5 | Signal used by debuggers |
| SIGABRT | 6 | Process called abort() function, deliberate crash |
| SIGIOT | 6 | Generated by PDP-11 “iot” instruction, on Linux SIGABRT is used |
| SIGBUS | 7 | Like SIGSEGV, but when trying to use invalid memory address |
| SIGEMT | - | Emulator trap, received when performing certain unimplemented instructions |
| SIGFPE | 8 | Floating-point exception, but also occurs with fatal arithmetic errors like division by zero or overflow |
| SIGKILL | 9 | Forced stop of a process, more forceful than SIGTERM |
| SIGUSR1 | 10 | Reserved for a developer to use and define a relevant action |
| SIGSEGV | 11 | Segmentation fault or access violation, usually when incorrect memory location is attempted to access. |
| SIGUSR2 | 12 | Similar to SIGUSR1, second reserved signal |
| SIGPIPE | 13 | Broken pipe, related to pipes and FIFO special files |
| SIGALRM | 14 | Expiration of timer that measures real or clock time, used by function like alarm() |
| SIGTERM | 15 | Tell process to stop |
| SIGSTKFLT | 16 | Stack fault, sent to process when a stack overflow or stack underflow occurs |
| SIGCHLD | 17 | Signal sent to parent process when child process is stopped |
| SIGCLD | - | Obsolete, replaced by SIGCHLD |
| SIGCONT | 18 | |
| SIGSTOP | 19 | Stop a process, can not be handled nor ignored by a process |
| SIGTSTP | 20 | Interactive stop request, can be ignored by a process |
| SIGTTIN | 21 | Signal to instruct that reading from terminal is not possible, for example for tasks running in background |
| SIGTTOU | 22 | Same as SIGTTOU, but for writing output to terminal |
| SIGURG | 23 | Urgent signal for out-of-band data, special handling |
| SIGXCPU | 24 | CPU time limit exceeded |
| SIGXFSZ | 25 | File size limit exceeded, such as a defined soft limit |
| SIGVTALRM | 26 | Short for virtual time alarm, expiration of timer that measures CPU time by the current process |
| SIGPROF | 27 | Used for code profiling, CPU time used by process and CPU time expended on behalf of process by the system itself |
| SIGWINCH | 28 | Signal used for events related to resizing of window |
| SIGIO | 29 | Signal to inform when a file descriptor is ready, for example to perform input or output |
| SIGPOLL | - | System V signal, very similar to SIGIO |
| SIGPWR | 30 | Signal only used by init process, typically due to hardware issue |
| SIGINFO | - | Information request, may let the process share some information such as its status |
| SIGLOST | - | Resource lost, such as a lock on NFS resource |
| SIGSYS | 31 | Bad argument provided to a system call (syscall) |
| SIGUNUSED | 31 |
