diff options
-rw-r--r-- | hush.c | 2 | ||||
-rw-r--r-- | shell/hush.c | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -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) diff --git a/shell/hush.c b/shell/hush.c index 976fa38..b8e4a55 100644 --- a/shell/hush.c +++ b/shell/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) |