...
Code Block | ||
---|---|---|
| ||
void handler(int signum) {
#ifdef WINDOWS
signal(signum, handler);
#endif
/* rest of handling code */
}
|
Non-persistent handlers
...
Code Block | ||
---|---|---|
| ||
void handler(int signum) {
#ifdef WINDOWS
/* windows automatically resets handlers to default */
#else
signal(signum, SIG_DFL);
#endif
/* rest of handling code */
}
|
Risk Analysis
...