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

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Linux/ke...', 1758199098, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Linux/kernel/process/signal(138): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78