summaryrefslogtreecommitdiff
path: root/trap.c
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2012-04-09 09:59:49 -0400
committerChet Ramey <chet.ramey@case.edu>2012-04-09 09:59:49 -0400
commit278286c99adbe62dbb7e3c14448d5a1d794ed8a0 (patch)
tree16f6e6a0bc16f79127afeacd12494750360b70dc /trap.c
parente73012f12c908aa39cfe9b95347c8ee6cf85dd76 (diff)
downloadbash-278286c99adbe62dbb7e3c14448d5a1d794ed8a0.tar.gz
commit bash-20120309 snapshot
Diffstat (limited to 'trap.c')
-rw-r--r--trap.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/trap.c b/trap.c
index b4ade376..d8941b00 100644
--- a/trap.c
+++ b/trap.c
@@ -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