Versions Compared

Key

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

...

While the handler in this example does not call signal(), it could do so safely because the signal is masked, and 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 must be masked 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 it should not be attempted. In cases where  If 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.

...

CERT C++ Secure Coding Standard: SIG34-CPP. Do not call signal() from within interruptible signal handlers

ISO/IEC 9899-1999TR2 Section :2011 Section 7.14.1.1, "The signal function"

...

MITRE CWE: CWE-479, "Unsafe Function Call function call from a Signal Handlersignal handler"

Bibliography

...