diff options
author | Matt Kraai <kraai@debian.org> | 2001-05-02 15:37:09 +0000 |
---|---|---|
committer | Matt Kraai <kraai@debian.org> | 2001-05-02 15:37:09 +0000 |
commit | 1c8a59ab95d4b1a91506c69fb211fe1077e0c755 (patch) | |
tree | a6cdca169a5a095e9a2d1d1a8ffc3bcf2117c187 /shell | |
parent | f162e7d09d4023bb8c7e15d80105f46da4b92437 (diff) | |
download | busybox-1c8a59ab95d4b1a91506c69fb211fe1077e0c755.tar.gz |
Use the current pgrp, not pid, when resetting the foreground process group.
Fixes bizarre suspension when executing `echo`.
Diffstat (limited to 'shell')
-rw-r--r-- | shell/hush.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/hush.c b/shell/hush.c index 9134251f5..4641e59c8 100644 --- a/shell/hush.c +++ b/shell/hush.c @@ -1186,7 +1186,7 @@ static int run_list_real(struct pipe *pi) if (tcsetpgrp(0, pi->pgrp) && errno != ENOTTY) perror_msg("tcsetpgrp"); rcode = pipe_wait(pi); - if (tcsetpgrp(0, getpid()) && errno != ENOTTY) + if (tcsetpgrp(0, getpgrp()) && errno != ENOTTY) perror_msg("tcsetpgrp"); signal(SIGTTIN, SIG_DFL); signal(SIGTTOU, SIG_DFL); |