diff options
author | Chet Ramey <chet.ramey@case.edu> | 2012-04-09 09:59:49 -0400 |
---|---|---|
committer | Chet Ramey <chet.ramey@case.edu> | 2012-04-09 09:59:49 -0400 |
commit | 278286c99adbe62dbb7e3c14448d5a1d794ed8a0 (patch) | |
tree | 16f6e6a0bc16f79127afeacd12494750360b70dc /trap.c | |
parent | e73012f12c908aa39cfe9b95347c8ee6cf85dd76 (diff) | |
download | bash-278286c99adbe62dbb7e3c14448d5a1d794ed8a0.tar.gz |
commit bash-20120309 snapshot
Diffstat (limited to 'trap.c')
-rw-r--r-- | trap.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -453,6 +453,17 @@ set_impossible_sigchld_trap () change_signal (SIGCHLD, (char *)IMPOSSIBLE_TRAP_HANDLER); sigmodes[SIGCHLD] &= ~SIG_TRAPPED; /* maybe_set_sigchld_trap checks this */ } + +/* Act as if we received SIGCHLD NCHILD times and increment + pending_traps[SIGCHLD] by that amount. This allows us to still run the + SIGCHLD trap once for each exited child. */ +void +queue_sigchld_trap (nchild) + int nchild; +{ + if (nchild > 0) + pending_traps[SIGCHLD] += nchild; +} #endif /* JOB_CONTROL && SIGCHLD */ void |