diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-05-04 22:13:37 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-05-04 22:13:37 +0000 |
commit | 2dcfba71170ad91538a7dbb4dd97ec0c1d2f9788 (patch) | |
tree | 80b421711d8dac01773031ac2f147a0e6a2afc96 | |
parent | 044a72d0d50bb7380601232d1388453f01fff622 (diff) | |
download | busybox-w32-2dcfba71170ad91538a7dbb4dd97ec0c1d2f9788.tar.gz busybox-w32-2dcfba71170ad91538a7dbb4dd97ec0c1d2f9788.tar.bz2 busybox-w32-2dcfba71170ad91538a7dbb4dd97ec0c1d2f9788.zip |
Larry's variant on Evin Robertson's fix to what I messed up
trying to make job control work. This fix makes it so that
hush doesn't error out when init hasn't set up job control,
as in when init=/bin/sh
-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) | |||
1185 | pi->pgrp = 0; | 1185 | pi->pgrp = 0; |
1186 | 1186 | ||
1187 | /* Check if we are supposed to run in the foreground */ | 1187 | /* Check if we are supposed to run in the foreground */ |
1188 | if (pi->followup!=PIPE_BG) { | 1188 | if (interactive && pi->followup!=PIPE_BG) { |
1189 | if ((pi->pgrp = tcgetpgrp(ctty = 2)) < 0 | 1189 | if ((pi->pgrp = tcgetpgrp(ctty = 2)) < 0 |
1190 | && (pi->pgrp = tcgetpgrp(ctty = 0)) < 0 | 1190 | && (pi->pgrp = tcgetpgrp(ctty = 0)) < 0 |
1191 | && (pi->pgrp = tcgetpgrp(ctty = 1)) < 0) | 1191 | && (pi->pgrp = tcgetpgrp(ctty = 1)) < 0) |
diff --git a/shell/hush.c b/shell/hush.c index 976fa3805..b8e4a55c2 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -1185,7 +1185,7 @@ static int run_pipe_real(struct pipe *pi) | |||
1185 | pi->pgrp = 0; | 1185 | pi->pgrp = 0; |
1186 | 1186 | ||
1187 | /* Check if we are supposed to run in the foreground */ | 1187 | /* Check if we are supposed to run in the foreground */ |
1188 | if (pi->followup!=PIPE_BG) { | 1188 | if (interactive && pi->followup!=PIPE_BG) { |
1189 | if ((pi->pgrp = tcgetpgrp(ctty = 2)) < 0 | 1189 | if ((pi->pgrp = tcgetpgrp(ctty = 2)) < 0 |
1190 | && (pi->pgrp = tcgetpgrp(ctty = 0)) < 0 | 1190 | && (pi->pgrp = tcgetpgrp(ctty = 0)) < 0 |
1191 | && (pi->pgrp = tcgetpgrp(ctty = 1)) < 0) | 1191 | && (pi->pgrp = tcgetpgrp(ctty = 1)) < 0) |