Signal (computing)
A signal is an asynchronous event transmitted between one process and another.
In Unix, Unix-like, and other POSIX-compliant operating systems, there is a uniform way of using signals, such as making use of the kill() system call to send signals, and the signal() or sigaction() system calls are used to set up signal handlers—functions to "catch" the signal and handle the signal in a particular way.
The Single Unix Specification specifies the following signals for <signal.h>:
- SIGABRT - process aborted
- SIGALRM - signal raised by alarm
- SIGBUS - bus error "access to undefined portion of memory object"(SUS)
- SIGCHLD - child process terminated, stopped (*or continued)
- SIGCONT - continue if stopped
- SIGFPE - floating point exception -- "erroneous arithmetic operation"(SUS)
- SIGHUP - hangup
- SIGILL - illegal instruction
- SIGINT - interrupt
- SIGKILL - kill
- SIGPIPE - write to pipe with no one reading
- SIGQUIT - quit
- SIGSEGV - segmentation violation
- SIGSTOP - stop executing
- SIGTERM - termination
- SIGTSTP - terminal stop signal
- SIGTTIN - background process attempting to read ("in")
- SIGTTOU - background process attempting to write ("out")
- SIGUSR1 - user defined 1
- SIGUSR2 - user defined 2
- *SIGPOLL - pollable event
- *SIGPROF - profiling timer expired
- *SIGSYS - bad syscall
- *SIGTRAP - trace/breakpoint trap
- SIGURG - urgent data available on socket
- *SIGVTALRM - signal raised by timer counting virtual time -- "virtual timer expired"(SUS)
- *SIGXCPU - CPU time limit exceeded
- *SIGXFSZ - file size limit exceeded
Where a section is marked by an asterisk, this denotes an X/Open System Interfaces (XSI) extension. Wording in quotes appended with (SUS) denotes the wording from the SUS[1].
| POSIX Signals |
| Reliable Signals |
| SIGABRT | SIGALRM | SIGFPE | SIGHUP | SIGILL | SIGINT | SIGKILL | SIGPIPE | SIGQUIT | SIGSEGV | SIGTERM | SIGUSR1 | SIGUSR2 | SIGCHLD | SIGCONT | SIGSTOP | SIGTSTP | SIGTTIN | SIGTTOU | SIGBUS | SIGPOLL | SIGPROF | SIGSYS | SIGTRAP | SIGURG | SIGVTALRM | SIGXCPU | SIGXFSZ |
| Realtime Signals † |
| SIGRTMIN | SIGRTMAX |
| † realtime signals are user definable, the symbolic realtime signals are simply markers for programmers, eg. SIGRTMIN+n. |
