aboutsummaryrefslogtreecommitdiff
path: root/hush.c
diff options
context:
space:
mode:
Diffstat (limited to 'hush.c')
-rw-r--r--hush.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hush.c b/hush.c
index 976fa3805..b8e4a55c2 100644
--- a/hush.c
+++ b/hush.c
@@ -1185,7 +1185,7 @@ static int run_pipe_real(struct pipe *pi)
pi->pgrp = 0;
/* Check if we are supposed to run in the foreground */
- if (pi->followup!=PIPE_BG) {
+ if (interactive && pi->followup!=PIPE_BG) {
if ((pi->pgrp = tcgetpgrp(ctty = 2)) < 0
&& (pi->pgrp = tcgetpgrp(ctty = 0)) < 0
&& (pi->pgrp = tcgetpgrp(ctty = 1)) < 0)