about summary refs log tree commit diff
path: root/Src/jobs.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2004-04-19 16:02:17 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2004-04-19 16:02:17 +0000
commitb5ceb73026791281532ea9638cadac491b27959b (patch)
treecf3a758d87070a5a6b7d8e003e1f015c41b7a9d9 /Src/jobs.c
parent55940daefb5b75bb929bda03612fafab6beedaff (diff)
downloadzsh-b5ceb73026791281532ea9638cadac491b27959b.tar.gz
zsh-b5ceb73026791281532ea9638cadac491b27959b.tar.xz
zsh-b5ceb73026791281532ea9638cadac491b27959b.zip
zsh-users/7365: new TRAPS_ASYNC option
Diffstat (limited to 'Src/jobs.c')
-rw-r--r--Src/jobs.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/Src/jobs.c b/Src/jobs.c
index 0188989df..072a91744 100644
--- a/Src/jobs.c
+++ b/Src/jobs.c
@@ -994,7 +994,11 @@ zwaitjob(int job, int sig)
     int q = queue_signal_level();
     Job jn = jobtab + job;
 
-    dont_queue_signals();
+    queue_not_sigchld++;
+    if (isset(TRAPSASYNC))
+	dont_queue_signals();
+    else
+	queue_signals();
     child_block();		 /* unblocked during child_suspend() */
     if (jn->procs || jn->auxprocs) { /* if any forks were done         */
 	jn->stat |= STAT_LOCKED;
@@ -1026,6 +1030,9 @@ zwaitjob(int job, int sig)
     }
     child_unblock();
     restore_queue_signals(q);
+    if (!queueing_enabled)
+	run_queued_signals();
+    queue_not_sigchld--;
 }
 
 /* wait for running job to finish */