Linux signal
You can get the manual on using signal by running
man 7 signal
Sending signals
The list of system calls and library functions that allow sending a signal
| Name: | Description: |
|---|---|
| raise(3) | Sends a signal to the calling thread. |
| kill(2) | Sends a signal to a specified process, to all members of a specified process group, or to all processes on the system. |
| killpg(2) | Sends a signal to all of the members of a specified process group. |
| pthread_kill(3) | Sends a signal to a specified POSIX thread in the same process as the caller. |
| tgkill(2) | Sends a signal to a specified thread within a specific process. (This is the system call used to implement pthread_kill(3).) |
| sigqueue(3) | Sends a real-time signal with accompanying data to a specified process. |
Standard signals
The list of standard signals that Linux supports.
Some signal numbers depend on the system architecture. You can see this from the "Value" column.
Where three values are given, the first usually works on alpha or sparc; the middle one on x86, arm and most others; the last value is given for mips.
(Values for parisc are not shown; study the Linux kernel source if you need the signal numbers for this architecture)
The letter A indicates that this signal is absent on that architecture.
Signals that were described in the original POSIX.1-1990 standard.
Signal Value Action Comment ────────────────────────────────────────────────────────────────────── SIGHUP 1 Term Hangup detected on controlling terminal or death of controlling process SIGINT 2 Term Interrupt from keyboard SIGQUIT 3 Core Quit from keyboard SIGILL 4 Core Illegal Instruction SIGABRT 6 Core Abort signal from abort(3) SIGFPE 8 Core Floating point exception SIGKILL 9 Term Kill signal SIGSEGV 11 Core Invalid memory reference SIGPIPE 13 Term Broken pipe: write to pipe with no readers SIGALRM 14 Term Timer signal from alarm(2) SIGTERM 15 Term Termination signal SIGUSR1 30,10,16 Term User-defined signal 1 SIGUSR2 31,12,17 Term User-defined signal 2 SIGCHLD 20,17,18 Ign Child stopped or terminated SIGCONT 19,18,25 Cont Continue if stopped SIGSTOP 17,19,23 Stop Stop process SIGTSTP 18,20,24 Stop Stop typed at terminal SIGTTIN 21,21,26 Stop Terminal input for background process SIGTTOU 22,22,27 Stop Terminal output for background process The signals SIGKILL and SIGSTOP cannot be caught, blocked, or ignored.
Article author: Andrei Olegovich