MCPcopy Create free account
hub / github.com/coreutils/coreutils / sig_needs_handling

Function sig_needs_handling

src/timeout.c:421–434  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

419/* Filter out signals that were ignored. */
420
421static bool
422sig_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
436static void
437install_cleanup (int sigterm)

Callers 2

install_cleanupFunction · 0.85
block_cleanup_and_chldFunction · 0.85

Calls 1

sigactionClass · 0.70

Tested by

no test coverage detected