Signals are a limited form of inter-process communication used in Unix, Unix-like, and other POSIX-compliant operating systems. A signal is an notification sent to a process or to a specific thread within the same process in order to notify it of an event that occurred. Signals originated in 1970s Bell Labs Unix and have been more recently specified in the POSIX standard.
When a signal is sent, the operating system interrupts the target process' normal flow of execution to deliver the signal. Execution can be interrupted during any non-atomic instruction. If the process has previously registered a signal handler, that routine is executed. Otherwise, the default signal handler is executed.
Embedded programs may find signals useful for interprocess communications, as the computational and memory footprint for signals is small.
Version 1 Unix had separate system calls to catch interrupts, quits, and machine traps. Version 4 combined all traps into one call, signal, and each numbered trap received a symbolic name in Version 7. kill appeared in Version 2, and in Version 5 could send arbitrary signals.Plan 9 from Bell Labs replaced signals with notes, which permit sending short, arbitrary strings.
The kill(2) system call sends a specified signal to a specified process, if permissions allow. Similarly, the kill(1) command allows a user to send signals to processes. The raise(3)
library function sends the specified signal to the current process.