What are signals in a Unix-like OS, and how are they used for inter-process communication?
Last updated
A signal is an asynchronous software interrupt carrying only a number (e.g.
SIGINT,SIGTERM), sent by the kernel or by processes viakill().A process can take the default action, ignore it, or catch it with
sigaction().SIGKILLandSIGSTOPcannot be caught or ignored.As IPC it suits notification and control, not data. Standard signals aren't queued, and handlers should only set a
volatile sig_atomic_tflag (async-signal-safety).
- https://medium.com/illumination/understanding-signals-in-unix-systems-a-deep-dive-7d4355b4a9cb
- https://github.com/ANSANJAY/unix-signals-ipc-guide
- https://www.geeksforgeeks.org/linux-unix/signals-and-traps-in-unix/
- https://www.geeksforgeeks.org/linux-unix/shell-scripting-bash-trap-command/
- https://tldp.org/LDP/tlk/ipc/ipc.html