diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-08-31 13:55:45 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-08-31 13:55:45 +0000 |
commit | ced33358fcbeb9e469927a63c33d73acc1db5c32 (patch) | |
tree | 3dd13ff6628cd65eba064ba95d788449926b09a8 /Src/exec.c | |
parent | 8e5365152aa58bb0d8a209efe176e1e7ae70675f (diff) | |
download | zsh-ced33358fcbeb9e469927a63c33d73acc1db5c32.tar.gz zsh-ced33358fcbeb9e469927a63c33d73acc1db5c32.tar.xz zsh-ced33358fcbeb9e469927a63c33d73acc1db5c32.zip |
zsh-workers/7573
Diffstat (limited to 'Src/exec.c')
-rw-r--r-- | Src/exec.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Src/exec.c b/Src/exec.c index 97e8f4912..2fb3b5e9b 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -1760,6 +1760,13 @@ execcmd(Cmd cmd, int input, int output, int how, int last1) #ifdef PATH_DEV_FD closem(2); #endif + + /* If there is already a group leader but that has died, we make + * this one the leader. */ + if (pline_level == 1 && jobtab[thisjob].procs && + kill(jobtab[thisjob].gleader, 0) == -1) + jobtab[thisjob].gleader = pid; + if (how & Z_ASYNC) { lastpid = (zlong) pid; } else if (!jobtab[thisjob].stty_in_env && |