Search notes:

Linux signals

A signal is a software interrupt that is sent to a process. Thus, it is a means to report the occurrence of exceptional situations to a process.
A signal interrupts the execution of a process. In certain situations (such as when the cpu is asked to divide a number by zero or trying to access invalid memory), the operation system uses signals to notify a process of this situation.

Signal numbrs

A signal is identified by its number.
For software interrupts, the number is between 0 and 255. For exceptions (like SIGINT, SIGHUP etc) , the range is between 256 and 287.

Handling signals

Except for SIGKILL and SIGSTOP, a process can handle signals differently:

Some signals

The following section lists a few signals and their default disposition (which is what a process should do when it receives the signal).

SIGTERM

Terminate a process. Even daemons react to this signal.

SIGHUP

SIGINT

The TTY driver sends SIGINT when the interactive attention character (default: ctrl-c, ascii 3) was found in the input stream.
The interactive attention character can be changed with stty intr.

SIGQUIT

SIGQUIT is similar to SIGINT. The triggering character is ^\

SIGPIPE

SIGPIPE is sent to processes that attempt to write into a pipe without a reader.
For example: a SIGPIPE terminates yes in `

SIGCHILD

SIGCHILD is sent to the parent process that changes its state.

SIGSTOP

SIGSTOP suspends the respective process. The signal can not be reconfigured by a process.
The suspended process will resume work with a SIGCONT signal

SIGCONT

Resume a stopped process (See SIGSTOP).

SIGTSTP

SIGTTIN

SIGTTOU

SIGWINCH

TODO

ps -s

See also

kill
Use kill -l to list implemented signals.
Signals can be traced with strace.
Signal names seem to be defined in /usr/include/asm/signal.h.

Index