Versions Compared

Key

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

...

A signal handler may call signal() only if it does not need to be asynchronous-safe (in other words, all relevant signals are masked, and consequently it may not so that the handler cannot be interrupted.)

Noncompliant Code Example

...

While the handler in this example does not call signal(), it could do so safely because the signal is masked, and consequently the handler cannot be interrupted. If the same handler is installed for more than one signal number, it would be necessary to mask the signals explicitly in act.sa_mask to ensure that the handler cannot be interrupted, because the system masks only the signal being delivered.

...

There is no safe way to implement persistent signal handler behavior on Windows platforms, and consequently it should not be attempted. In cases where a design depends on this behavior and the design cannot be altered, it may be necessary to claim a deviation from the rule after completing an appropriate risk analysis.

...