about summary refs log tree commit diff
path: root/Src/exec.c
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@zsh.org>2022-11-09 20:24:57 -0800
committerBart Schaefer <schaefer@zsh.org>2022-11-09 20:24:57 -0800
commit61610ea4bdc3e2de11c258017f377db3d1d6d993 (patch)
treee1ea99cb664d077b15f872fe8d057c4cf3ec2d1e /Src/exec.c
parentd873ed6026d7b0c48d6e65ec06df491d015a4d59 (diff)
downloadzsh-61610ea4bdc3e2de11c258017f377db3d1d6d993.tar.gz
zsh-61610ea4bdc3e2de11c258017f377db3d1d6d993.tar.xz
zsh-61610ea4bdc3e2de11c258017f377db3d1d6d993.zip
50922: fix additional cases of signals for current shell jobs on the right of a pipeline.
Backs out part of 188c5cd5 (workers/50874).  With this change, after a
new subshell is forked upon suspend of the right side of a pipeline, the
previous foreground subjob is resumed first and the new subshell remains
stopped until that job finishes.
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/Src/exec.c b/Src/exec.c
index 2422dae91..d4e681887 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -1899,8 +1899,12 @@ execpline(Estate state, wordcode slcode, int how, int last1)
 			break;
 		    }
 		}
-		else if (subsh && jn->stat & STAT_STOPPED)
-		    thisjob = newjob;
+		else if (subsh && jn->stat & STAT_STOPPED) {
+		    if (thisjob == newjob)
+			makerunning(jn);
+		    else
+			thisjob = newjob;
+		}
 		else
 		    break;
 	    }