Linux signals

From Leo's Notes
Last edited on 24 September 2022, at 09:03.

Signals are messages that are sent to a program.

Here are some Linux signals in brief detail. You may quickly list available signals by running kill -l.

Signal Name Signal Number Description
SIGHUP 1 Hangs up signals when controlling the terminal or at the end of the controlling processes.
SIGINT 2 Signals when the Linux user presses Ctrl-c
SIGQUIT 3 Signals when the Linux user presses Ctrl-d
SIGILL       4 Illegal instruction trap
SIGTRAP 5 Trap or breakpoint signal
SIGABRT 6 Abort signal
SIGBUS       7 Illegal access to an undefined portion of memory
SIGFPE 8 Signals when any unexpected mathematical operation is performed.
SIGKILL 9 When any of the process issues this signal, it will quit immediately.
SIGUSR1 10 User defined signal. Typically programs will print its status (eg. dd)
SIGSEGV 11 Segmentation fault
SIGUSR2     12 User defined signal.
SIGPIPE     13 Write on a pipe with no one to read it
SIGALRM 14 Signals for alarm clock
SIGTERM 15 Signals to terminate the process or the software.
SIGSTKFLT   16 Stack fault
SIGSTOP 17 Signals to stop the process in Linux.
SIGCONT     18 Resume program execution from a SIGSTOP or SIGTSTP.
SIGSTOP     19 Stop signal sent with kill -STOP to suspend a program. Cannot be ignored by the program.
SIGTSTP 20 Signals when the Linux user presses Ctrl-z. May be ignored by the program.
SIGTTIN     21 Delivered to a background process if it tries to read from the terminal.
SIGTTOU     22 Delivered to a background process if it tries to write to the terminal.
SIGURG 23 Urgent data received on a socket.
SIGXCPU     24 Process exceeds CPU limit or time. Save your work before you get killed.
SIGXFSZ 25 File written by this process exceeded some size limit.
SIGVTALRM   26 CPU time elapsed
SIGPROF 27
SIGWINCH     28 Window size changed.
SIGIO       29 Signal input/output trap. Program should abort unless handled properly.
SIGPWR 30 Power failure?
SIGSYS 31 Bad system call

See also