From 1c8a59ab95d4b1a91506c69fb211fe1077e0c755 Mon Sep 17 00:00:00 2001 From: Matt 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`. --- hush.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hush.c') diff --git a/hush.c b/hush.c index 9134251f5..4641e59c8 100644 --- a/hush.c +++ b/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