Asynchronous signal safe function
An asynchronous signal-safe function is a function permitted to execute in an asynchronous signal handler without violating signal-handling rules.
Modern C
An asynchronous signal safe function is a function that may be called from a handler for an asynchronous signal without violating the signal-handling rules.
- How it is used
- Constrains which functions an asynchronous signal handler may call without uncontrolled changes to program state.
- How deep it goes
- Defines the rule, lists C-standard guarantees, and distinguishes portable guarantees from broader platform allowances.
- Examples
- Uses a handler that calls quick_exit or _Exit and resets handling with signal.
- What you can do after
- Evaluate/understand whether a proposed handler call has a C-standard safety guarantee rather than assuming ordinary library calls are safe.
Read how Modern C explains asynchronous signal safe function →
Modern C, Third Edition
An asynchronous signal-safe function is a function permitted to execute in an asynchronous signal handler without uncontrolled access to program state.
- How it is used
- Constrains which functions an asynchronous C signal handler may call without uncontrolled access to program state.
- How deep it goes
- Defines the safety rule and lists narrow standard guarantees, while deferring fuller treatment of atomic operations.
- Examples
- Uses a conditionally compiled atomic signal counter and contrasts permitted termination calls with `exit` and I/O.
- What you can do after
- Evaluate/understand whether a signal-handler call has a stated C-standard safety guarantee rather than assuming one.
Read how Modern C, Third Edition explains asynchronous signal safe function →
Related concepts
- signal handlercontrasts with · A signal handler is a function or mechanism that specifies or performs a response when a signal or notification is delivered.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

