sh: Pass along SIGINT from a child if job control is enabled, even when not

interactive.

I added the interactive check in r208881 to be safe, but in actual use
(scripts in set -m mode) passing along SIGINT seems best.

Discussed with:	bdrewery
This commit is contained in:
Jilles Tjoelker 2015-04-25 13:34:25 +00:00
parent da551bb2c2
commit cad3cc1310
1 changed files with 1 additions and 1 deletions

View File

@ -1057,7 +1057,7 @@ waitforjob(struct job *jp, int *origstatus)
CLEAR_PENDING_INT;
}
#if JOBS
else if (rootshell && iflag && propagate_int &&
else if (rootshell && propagate_int &&
WIFSIGNALED(status) && WTERMSIG(status) == SIGINT)
kill(getpid(), SIGINT);
#endif