mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-26 18:01:03 +02:00
zsh-workers/7605
This commit is contained in:
parent
f25a524da5
commit
3334b38905
2 changed files with 2 additions and 10 deletions
|
@ -1760,13 +1760,6 @@ 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 &&
|
||||
|
@ -2243,7 +2236,7 @@ entersubsh(int how, int cl, int fake)
|
|||
}
|
||||
} else if (thisjob != -1 && cl) {
|
||||
if (jobtab[list_pipe_job].gleader && (list_pipe || list_pipe_child)) {
|
||||
if (kill(jobtab[list_pipe_job].gleader, 0) == -1 ||
|
||||
if (killpg(jobtab[list_pipe_job].gleader, 0) == -1 ||
|
||||
setpgrp(0L, jobtab[list_pipe_job].gleader) == -1) {
|
||||
jobtab[list_pipe_job].gleader =
|
||||
jobtab[thisjob].gleader = (list_pipe_child ? mypgrp : getpid());
|
||||
|
|
|
@ -1292,8 +1292,7 @@ bin_fg(char *name, char **argv, char *ops, int func)
|
|||
thisjob = job;
|
||||
if ((jobtab[job].stat & STAT_SUPERJOB) &&
|
||||
((!jobtab[job].procs->next ||
|
||||
WIFEXITED(jobtab[job].procs->status) ||
|
||||
WIFSIGNALED(jobtab[job].procs->status))) &&
|
||||
killpg(jobtab[job].gleader, 0) == -1)) &&
|
||||
jobtab[jobtab[job].other].gleader)
|
||||
attachtty(jobtab[jobtab[job].other].gleader);
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue