Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

All functions not in the this table are considered to be unsafe with respect to signals. In the presence of signals, all functions defined by IEEE Std 1003.1-2001 behave as defined when called from or interrupted by a signal-catching function, with a single exception: when a signal interrupts an unsafe function and the signal-catching function calls an unsafe function, the behavior is undefined.

Note that while raise() is on the list of asynchronous-safe functions, it is specifically covered by SIG33-C. Do not recursively invoke the raise() function.

Compliant Solution

Signal handlers should be as concise as possible, ideally unconditionally setting a flag and returning. They may also call the _Exit() function.

...