about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/exec.c2
-rw-r--r--Src/jobs.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/Src/exec.c b/Src/exec.c
index a635c18ed..45f1c66f0 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -1607,8 +1607,8 @@ execpline(Estate state, wordcode slcode, int how, int last1)
 		    !(jobtab[list_pipe_job].stat & STAT_STOPPED)) {
 		    int q = queue_signal_level();
 		    child_unblock();
-		    dont_queue_signals();
 		    child_block();
+		    dont_queue_signals();
 		    restore_queue_signals(q);
 		}
 		if (list_pipe_child &&
diff --git a/Src/jobs.c b/Src/jobs.c
index 933348851..ed647b87e 100644
--- a/Src/jobs.c
+++ b/Src/jobs.c
@@ -1420,9 +1420,9 @@ zwaitjob(int job, int wait_cmd)
     int q = queue_signal_level();
     Job jn = jobtab + job;
 
-    dont_queue_signals();
     child_block();		 /* unblocked during signal_suspend() */
     queue_traps(wait_cmd);
+    dont_queue_signals();
     if (jn->procs || jn->auxprocs) { /* if any forks were done         */
 	jn->stat |= STAT_LOCKED;
 	if (jn->stat & STAT_CHANGED)
@@ -1478,9 +1478,9 @@ zwaitjob(int job, int wait_cmd)
 	pipestats[0] = lastval;
 	numpipestats = 1;
     }
+    restore_queue_signals(q);
     unqueue_traps();
     child_unblock();
-    restore_queue_signals(q);
 
     return 0;
 }