| 419 | /* Filter out signals that were ignored. */ |
| 420 | |
| 421 | static bool |
| 422 | sig_needs_handling (int sig, int sigterm) |
| 423 | { |
| 424 | if (sig == SIGALRM || sig == sigterm) |
| 425 | return true; /* We can't ignore these. */ |
| 426 | |
| 427 | /* Note background jobs in shells have SIGINT and SIGQUIT |
| 428 | set to SIG_IGN by default. I.e., those signals will |
| 429 | not be propagated through background timeout jobs. */ |
| 430 | struct sigaction old_sa; |
| 431 | sigaction (sig, NULL, &old_sa); |
| 432 | bool ret = old_sa.sa_handler != SIG_IGN; |
| 433 | return ret; |
| 434 | } |
| 435 | |
| 436 | static void |
| 437 | install_cleanup (int sigterm) |
no test coverage detected