From 9f64348639cb9645f68ec1c4b4ee41bc30883b29 Mon Sep 17 00:00:00 2001 From: kraai Date: Wed, 2 May 2001 15:37:09 +0000 Subject: 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 --- shell/hush.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'shell') 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); -- cgit v1.2.3-55-g6feb