Signal

Signals have a unique number or name. Either can be passed to a process by means of the kill(1) command. $ man 7 signal

or to look for the file directly:

$ find /usr/include -name signal.h -print

or run kill(1) (output from a Linux 2.6 system):

$ kill -l 1) SIGHUP      2) SIGINT       3) SIGQUIT      4) SIGILL 5) SIGTRAP     6) SIGABRT      7) SIGBUS       8) SIGFPE 9) SIGKILL    10) SIGUSR1     11) SIGSEGV     12) SIGUSR2 13) SIGPIPE    14) SIGALRM     15) SIGTERM     16) SIGSTKFLT 17) SIGCHLD    18) SIGCONT     19) SIGSTOP     20) SIGTSTP 21) SIGTTIN    22) SIGTTOU     23) SIGURG      24) SIGXCPU 25) SIGXFSZ    26) SIGVTALRM   27) SIGPROF     28) SIGWINCH 29) SIGIO      30) SIGPWR      31) SIGSYS

Here are the common signals (taken from a BSD, notice the difference from the signals above):


 * 1) define SIGHUP 1       /* hangup */
 * 2) define SIGINT 2       /* interrupt */
 * 3) define SIGQUIT 3      /* quit */
 * 4) define SIGILL 4       /* illegal instruction (not reset when caught) */
 * 5) define SIGTRAP 5      /* trace trap (not reset when caught) */
 * 6) define SIGABRT 6      /* abort */
 * 7) ifndef _POSIX_SOURCE
 * 8) define SIGIOT SIGABRT /* compatibility */
 * 9) define SIGEMT 7       /* EMT instruction */
 * 10) endif
 * 11) define SIGFPE 8       /* floating point exception */
 * 12) define SIGKILL 9      /* kill (cannot be caught or ignored) */
 * 13) define SIGBUS 10      /* bus error */
 * 14) define SIGSEGV 11     /* segmentation violation */
 * 15) define SIGSYS 12      /* bad argument to system call */
 * 16) define SIGPIPE 13     /* write on a pipe with no one to read it */
 * 17) define SIGALRM 14     /* alarm clock */
 * 18) define SIGTERM 15     /* software termination signal from kill */
 * 19) define SIGURG 16      /* urgent condition on IO channel */
 * 20) define SIGSTOP 17     /* sendable stop signal not from tty */
 * 21) define SIGTSTP 18     /* stop signal from tty */
 * 22) define SIGCONT 19     /* continue a stopped process */
 * 23) define SIGCHLD 20     /* to parent on child stop or exit */
 * 24) define SIGTTIN 21     /* to readers pgrp upon background tty read */
 * 25) define SIGTTOU 22     /* like TTIN for output if (tp->t_local&LTOSTOP) */
 * 26) ifndef _POSIX_SOURCE
 * 27) define SIGIO  23      /* input/output possible signal */
 * 28) endif
 * 29) define SIGXCPU 24     /* exceeded CPU time limit */
 * 30) define SIGXFSZ 25     /* exceeded file size limit */
 * 31) define SIGVTALRM 26   /* virtual time alarm */
 * 32) define SIGPROF 27     /* profiling time alarm */
 * 33) ifndef _POSIX_SOURCE
 * 34) define SIGWINCH 28    /* window size changes */
 * 35) define SIGINFO 29     /* information request */
 * 36) endif
 * 37) define SIGUSR1 30     /* user defined signal 1 */
 * 38) define SIGUSR2 31     /* user defined signal 2 */

Programs can set up "signal handlers" (traps) to execute a set of instructions after receiving the signal or to ignore signals. Of all signals SIGKILL (9) and SIGSTOP cannot be handled or ignored.