Versions Compared

Key

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

...

A C99-compliant solution to persist the handler on a Windows system is to rebind the signal to the handler in the first line of the handler itself.

Code Block
bgColor#ccccff
void handler(int signum) {
  signal(signum, handler);
  /* rest of handling code */
}

...

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

SIG01-A

1 (high)

1 (likely)

3 (low)

P3

L3

References

Wiki Markup
\[[ISO/IEC 9899-1999TR2|AA. C References#ISO/IEC 9899-1999]\] "The {{signal}} function"