mirror of
https://github.com/sheumann/hush.git
synced 2024-08-26 12:29:04 +00:00
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
This commit is contained in:
parent
044a72d0d5
commit
2dcfba7117
2
hush.c
2
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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user