diff options
author | kraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-05-02 15:37:09 +0000 |
---|---|---|
committer | kraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-05-02 15:37:09 +0000 |
commit | 9f64348639cb9645f68ec1c4b4ee41bc30883b29 (patch) | |
tree | a6cdca169a5a095e9a2d1d1a8ffc3bcf2117c187 /shell | |
parent | 41fc1112786937c53bdda70d8c468e3b8b65da81 (diff) | |
download | busybox-w32-9f64348639cb9645f68ec1c4b4ee41bc30883b29.tar.gz busybox-w32-9f64348639cb9645f68ec1c4b4ee41bc30883b29.tar.bz2 busybox-w32-9f64348639cb9645f68ec1c4b4ee41bc30883b29.zip |
Use the current pgrp, not pid, when resetting the foreground process group.
Fixes bizarre suspension when executing `echo`.
git-svn-id: svn://busybox.net/trunk/busybox@2511 69ca8d6d-28ef-0310-b511-8ec308f3f277
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) | |||
1186 | if (tcsetpgrp(0, pi->pgrp) && errno != ENOTTY) | 1186 | if (tcsetpgrp(0, pi->pgrp) && errno != ENOTTY) |
1187 | perror_msg("tcsetpgrp"); | 1187 | perror_msg("tcsetpgrp"); |
1188 | rcode = pipe_wait(pi); | 1188 | rcode = pipe_wait(pi); |
1189 | if (tcsetpgrp(0, getpid()) && errno != ENOTTY) | 1189 | if (tcsetpgrp(0, getpgrp()) && errno != ENOTTY) |
1190 | perror_msg("tcsetpgrp"); | 1190 | perror_msg("tcsetpgrp"); |
1191 | signal(SIGTTIN, SIG_DFL); | 1191 | signal(SIGTTIN, SIG_DFL); |
1192 | signal(SIGTTOU, SIG_DFL); | 1192 | signal(SIGTTOU, SIG_DFL); |