about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-02-01 17:02:24 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-02-01 17:02:24 +0000
commit3d6e25578857208be431d2288d3c33628b1de68d (patch)
treeb781ca09da909d469c13e3981d082a4fe06e31d0
parent1ebeb52021fe082ac7aa4174f44bfab8ba2ff60d (diff)
downloadzsh-3d6e25578857208be431d2288d3c33628b1de68d.tar.gz
zsh-3d6e25578857208be431d2288d3c33628b1de68d.tar.xz
zsh-3d6e25578857208be431d2288d3c33628b1de68d.zip
zsh-workers/9511
-rw-r--r--Src/exec.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/Src/exec.c b/Src/exec.c
index 7f6c9f136..82ddf3edd 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -981,13 +981,11 @@ execpline(Estate state, wordcode slcode, int how, int last1)
 		    makerunning(jn);
 		}
 		if (!(jn->stat & STAT_LOCKED))
-		    waitjobs();
-
-		if (list_pipe_job && jobtab[list_pipe_job].procs &&
-		    !(jobtab[list_pipe_job].stat & STAT_STOPPED)) {
-		    child_unblock();
-		    child_block();
-		}
+		    waitjobs();      /* Implicit child_unblock() */
+		else if (list_pipe_job && jobtab[list_pipe_job].procs &&
+		    !(jobtab[list_pipe_job].stat & STAT_STOPPED))
+		    child_unblock(); /* Permit job table update */
+		child_block();       /* Freeze job table again */
 		if (list_pipe_child &&
 		    jn->stat & STAT_DONE &&
 		    lastval2 & 0200)