about summary refs log tree commit diff
path: root/Src/jobs.c
diff options
context:
space:
mode:
authorPeter Stephenson <p.w.stephenson@ntlworld.com>2017-07-02 21:00:56 +0100
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2017-07-02 21:00:56 +0100
commitae10f88bfbb93b20aa831a7dd31a0ce1d347dbf0 (patch)
tree8bb3c0871e077a129ab904f4127dc5b4554db792 /Src/jobs.c
parente8edd42f7ff0fefbf74db7fbab2d242852b6bce6 (diff)
downloadzsh-ae10f88bfbb93b20aa831a7dd31a0ce1d347dbf0.tar.gz
zsh-ae10f88bfbb93b20aa831a7dd31a0ce1d347dbf0.tar.xz
zsh-ae10f88bfbb93b20aa831a7dd31a0ce1d347dbf0.zip
41386: when backgrounding a STAT_CURSH job, remove the flag.
This typical applies to a STAT_SUPERJOB.  It prevents it from
getting copied interrupts as a foreground process.
Diffstat (limited to 'Src/jobs.c')
-rw-r--r--Src/jobs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Src/jobs.c b/Src/jobs.c
index d1b98ac4d..32f7daab9 100644
--- a/Src/jobs.c
+++ b/Src/jobs.c
@@ -2288,8 +2288,10 @@ bin_fg(char *name, char **argv, Options ops, int func)
 	case BIN_FG:
 	case BIN_BG:
 	case BIN_WAIT:
-	    if (func == BIN_BG)
+	    if (func == BIN_BG) {
 		jobtab[job].stat |= STAT_NOSTTY;
+		jobtab[job].stat &= ~STAT_CURSH;
+	    }
 	    if ((stopped = (jobtab[job].stat & STAT_STOPPED))) {
 		makerunning(jobtab + job);
 		if (func == BIN_BG) {