summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-05-28 09:00:21 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-05-28 09:00:21 +0000
commit96fd8a11d382319af89bfc8ed250003c4114da84 (patch)
tree5faf57f320c972c18c769370c8bf043867f1a57b
parent148b4556832bcd633c9932a11b079d7d636fd91b (diff)
downloadzsh-96fd8a11d382319af89bfc8ed250003c4114da84.tar.gz
zsh-96fd8a11d382319af89bfc8ed250003c4114da84.tar.xz
zsh-96fd8a11d382319af89bfc8ed250003c4114da84.zip
another attempt at fixing the job problem from 14327; make execpline() reset list_pipe_job to zero if it would be set for a job started in the background (14503)
-rw-r--r--ChangeLog6
-rw-r--r--Src/exec.c5
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index e8a7b8a3b..5f63dd166 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-05-28  Sven Wischnowsky  <wischnow@zsh.org>
+
+	* 14503: Src/exec.c: another attempt at fixing the job problem
+	from 14327; make execpline() reset list_pipe_job to zero if it
+	would be set for a job started in the background
+
 2001-05-27  Bart Schaefer  <schaefer@zsh.org>
 
 	* unposted: Etc/MACHINES: Mention failure of gcc 2.7.1 on HPUX,
diff --git a/Src/exec.c b/Src/exec.c
index 859813ef6..aa78a7ce6 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -976,13 +976,16 @@ execpline(Estate state, wordcode slcode, int how, int last1)
         list_pipe_pid = 0;
 	nowait = 0;
 	simple_pline = (WC_PIPE_TYPE(code) == WC_PIPE_END);
-	list_pipe_job = (simple_pline ? 0 : newjob);
+	list_pipe_job = newjob;
     }
     lastwj = lpforked = 0;
     execpline2(state, code, how, opipe[0], ipipe[1], last1);
     pline_level--;
     if (how & Z_ASYNC) {
 	lastwj = newjob;
+
+        if (thisjob == list_pipe_job)
+            list_pipe_job = 0;
 	jobtab[thisjob].stat |= STAT_NOSTTY;
 	if (slflags & WC_SUBLIST_COPROC) {
 	    zclose(ipipe[1]);