diff options
author | jilles <jilles@FreeBSD.org> | 2015-04-25 13:34:25 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2015-04-25 13:34:25 +0000 |
commit | d038ee760f5dc1b1cfbfe87cb0722677dc43dc9a (patch) | |
tree | b5f47c8a1199bb6db224ae31df350a6ac6bae994 /bin | |
parent | 09e002d8cf136fba3639fbfa1d9c683b55f700a1 (diff) | |
download | FreeBSD-src-d038ee760f5dc1b1cfbfe87cb0722677dc43dc9a.zip FreeBSD-src-d038ee760f5dc1b1cfbfe87cb0722677dc43dc9a.tar.gz |
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
Diffstat (limited to 'bin')
-rw-r--r-- | bin/sh/jobs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/sh/jobs.c b/bin/sh/jobs.c index 753cf7b..b531231 100644 --- a/bin/sh/jobs.c +++ b/bin/sh/jobs.c @@ -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 |