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.
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).
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