about summary refs log tree commit diff
path: root/Src/jobs.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/jobs.c')
-rw-r--r--Src/jobs.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/Src/jobs.c b/Src/jobs.c
index 072a91744..7d89a7dbb 100644
--- a/Src/jobs.c
+++ b/Src/jobs.c
@@ -994,11 +994,8 @@ zwaitjob(int job, int sig)
     int q = queue_signal_level();
     Job jn = jobtab + job;
 
-    queue_not_sigchld++;
-    if (isset(TRAPSASYNC))
-	dont_queue_signals();
-    else
-	queue_signals();
+    dont_queue_signals();
+    queue_traps();
     child_block();		 /* unblocked during child_suspend() */
     if (jn->procs || jn->auxprocs) { /* if any forks were done         */
 	jn->stat |= STAT_LOCKED;
@@ -1029,10 +1026,8 @@ zwaitjob(int job, int sig)
 	numpipestats = 1;
     }
     child_unblock();
+    dont_queue_traps();
     restore_queue_signals(q);
-    if (!queueing_enabled)
-	run_queued_signals();
-    queue_not_sigchld--;
 }
 
 /* wait for running job to finish */