Skip to content

Operating-System Signal Delivery

An operating-system notification mechanism that applies a signal disposition to a process or thread.

Version
v1 · 2026-11-14 · History
Domain-specific #
14852
Domain group
Applied Sciences & Engineering
Origin domain
Computer Science & Software Engineering
Subdomain
Operating Systems → Computer Science & Software Engineering
Aliases
Unix signal, Signal IPC

Core Idea

A Unix-like operating system uses signals to notify a process or thread of events. A signal can come from another process, the kernel, or an error in the receiving thread's own execution. In Linux, each signal has a process-wide disposition: perform its default action, ignore it, or invoke an installed handler where permitted. Each thread has its own signal mask; pending signals may be process-directed or thread-directed. The resulting action may terminate or stop the process, or run a handler that can return; SIGKILL and SIGSTOP cannot be caught, blocked or ignored.[1]

This is a kernel-to-user notification mechanism, related to but distinct from processor interrupt entry. A signal generated by an instruction fault is not evidence that all signals are asynchronous with respect to the receiving execution.[1]

How would you explain it like I'm…

The Computer's Shoulder Tap

A computer runs lots of programs at once. Sometimes the computer needs to tap a program on the shoulder and say, "Hey, something happened!" That tap is called a signal. The program might do the usual thing, ignore it, or do something special it planned ahead. But a couple of taps, like "stop right now," can never be ignored.

Signals to Programs

In computers that work like Unix (including Linux), the operating system uses messages called signals to tell a running program that something happened. A signal can come from another program, from the operating system itself, or from a mistake the program made, like doing something not allowed. For each kind of signal, the program can let the default thing happen, ignore it, or run its own special code called a handler. The result might be that the program ends, pauses, or runs its handler and keeps going. Two signals — one that kills a program and one that stops it — can't be ignored or caught.

Kernel Signals to Processes

Unix-like operating systems use signals to notify a process (a running program) or one of its threads of an event. A signal may be sent by another process, by the kernel, or triggered by an error in the receiving thread's own execution, such as an illegal memory access. In Linux, each signal has a disposition shared by the whole process: take the default action, ignore it, or run a handler function the program installed. Each thread can also block certain signals with its own signal mask, and a signal waiting to be delivered may be aimed at the whole process or a specific thread. The result might be terminating or stopping the process, or running a handler that then returns to normal work. SIGKILL and SIGSTOP are special: they can't be caught, blocked or ignored.

 

Signals are the Unix-like kernel's mechanism for notifying a process or thread of events. A signal can originate from another process (for example via kill), from the kernel, or from a fault in the receiving thread's own execution. In Linux, disposition is per process: each signal is set to its default action, to be ignored, or to invoke an installed handler where that is permitted. Masking is per thread: each thread has a signal mask that blocks delivery, and pending signals are tracked as either process-directed or thread-directed. When a signal is delivered, the outcome may be termination or stopping of the process, or execution of a handler that can return to the interrupted code. SIGKILL and SIGSTOP cannot be caught, blocked or ignored. Signals are a kernel-to-user notification mechanism, related to but distinct from hardware interrupt entry. And because some signals are generated synchronously by an instruction fault, it is wrong to assume all signals arrive asynchronously relative to the receiving thread.

Masking and Pending Signals

In Linux, a blocked signal may remain pending. For a standard signal, multiple instances generated while it is blocked can coalesce into one pending instance. sigprocmask() reads or changes the calling thread's mask: SIG_BLOCK adds a set, SIG_UNBLOCK removes it, and SIG_SETMASK replaces the mask. Its use in a multithreaded process is unspecified; the manual directs such programs to pthread_sigmask().[1][2]

Linux real-time signals occupy a range bounded by SIGRTMIN and SIGRTMAX. Their application-visible limits may vary, so programs should use the macros and check the range rather than hard-code a number. Multiple real-time instances can be queued, unlike repeated blocked instances of a standard signal.[1]

Named and Numbered Examples

The following are Linux examples: a process can change many dispositions, so the action shown is the default, not an inevitable outcome.[1]

Signal Example association Default action
SIGINT Keyboard interrupt Terminate
SIGQUIT Keyboard quit Terminate with core dump
SIGABRT / SIGIOT Abort; SIGIOT is a synonym Terminate with core dump
SIGFPE Erroneous arithmetic operation Terminate with core dump
SIGSEGV Invalid memory reference Terminate with core dump
SIGTRAP Trace or breakpoint trap Terminate with core dump
SIGKILL Kill request; cannot be caught, blocked or ignored Terminate
SIGALRM Alarm timer Terminate
SIGTERM Termination request Terminate
SIGIO I/O possible Terminate
SIGPWR Power-failure indication Terminate
SIGWINCH Window-size change Ignore
SIGUSR1 / SIGUSR2 Application-defined uses Terminate

For Linux on x86 and Arm, signals 2, 3, 5, 6, 9, 11, 14 and 15 correspond respectively to SIGINT, SIGQUIT, SIGTRAP, SIGABRT, SIGKILL, SIGSEGV, SIGALRM and SIGTERM. Signal numbers in general vary by architecture and system; names are safer than treating every number as portable.[1]

SIGINFO demonstrates the need to name the system. FreeBSD documents it as a keyboard status request, normally discarded by the process. Linux on Alpha instead lists SIGINFO as a synonym for SIGPWR; that is not a general rule for all Linux architectures.[3][1]

POSIX Names and the Number Two

POSIX.1-2017 specifies symbolic signal names and default actions through <signal.h>; it also defines mask-operation constants such as SIG_BLOCK, SIG_UNBLOCK and SIG_SETMASK. The standard includes SIGINT as a terminal interrupt signal. These rules are a shared interface, while implementations can supply additional signals and differ in other details.[4]

The POSIX kill utility's -2 option selects SIGINT. That option is a numeric name for the utility, not a guarantee that the implementation's internal integer for SIGINT is 2: POSIX.1-2017 does not require specific signal numbers for these symbolic names. A program should use the symbolic constant rather than assume the integer value.[5]

Sending and Boundaries

The Linux psmisc killall utility sends a signal to processes matching the named commands; it accepts a signal by name or number. On the Linux architectures in the example above, killall -9 name requests SIGKILL for matches. A successful request is subject to permissions and process selection; the command's meaning and scope must not be assumed for every Unix implementation.[6][1]

A signal name or a redirect to a general signal page does not by itself specify a portable numeric value, origin, disposition or application behavior. Signal handlers also have restrictions on safely calling functions while interrupted state may be inconsistent; the separate interrupt entry describes that boundary. This account does not enumerate every signal or claim to reproduce the complete POSIX standard.

Neighborhood in Abstraction Space

Operating-System Signal Delivery sits in a sparse region of the domain-specific corpus (94th percentile for distinctiveness): few abstractions share its structure, so a faithful description tends to retrieve it precisely.

Family — Unclustered & Miscellaneous (3155 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-11-14

References

[1] Linux man-pages project, signal(7): Overview of signals. registry ↩a ↩b ↩c ↩d ↩e ↩f ↩g ↩h

[2] Linux man-pages project, sigprocmask(2): Examine and change blocked signals. registry ↩

[3] FreeBSD Project, signal(3): Signal management. registry ↩

[4] IEEE and The Open Group, 2017, signal.h: Signals. POSIX.1-2017 reprint. registry ↩

[5] IEEE and The Open Group, 2017, kill: Send a signal. POSIX.1-2017 reprint. registry ↩

[6] psmisc project, killall(1): Kill processes by name. registry ↩