diff options
Diffstat (limited to 'bin/sh/jobs.c')
-rw-r--r-- | bin/sh/jobs.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/bin/sh/jobs.c b/bin/sh/jobs.c index bbb954a..1c0c6bd 100644 --- a/bin/sh/jobs.c +++ b/bin/sh/jobs.c @@ -978,7 +978,6 @@ int waitforjob(struct job *jp, int *origstatus) { #if JOBS - pid_t mypgrp = getpgrp(); int propagate_int = jp->jobctl && jp->foreground; #endif int status; @@ -992,7 +991,7 @@ waitforjob(struct job *jp, int *origstatus) dotrap(); #if JOBS if (jp->jobctl) { - if (tcsetpgrp(ttyfd, mypgrp) < 0) + if (tcsetpgrp(ttyfd, rootpid) < 0) error("tcsetpgrp failed, errno=%d\n", errno); } if (jp->state == JOBSTOPPED) |