From 3ec2e5f38f68c71e8ee4fada26470d8795b1255a Mon Sep 17 00:00:00 2001 From: Paul Ackersviller Date: Sun, 6 May 2007 03:45:24 +0000 Subject: Merge of 21391: only pass SIGINT and SIGQUIT from foreground processes to the shell. --- Src/jobs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Src/jobs.c') diff --git a/Src/jobs.c b/Src/jobs.c index 59ce7ccb5..1cf961cc3 100644 --- a/Src/jobs.c +++ b/Src/jobs.c @@ -383,7 +383,8 @@ update_job(Job jn) } /* If we have `foo|while true; (( x++ )); done', and hit * ^C, we have to stop the loop, too. */ - if ((val & 0200) && inforeground == 1) { + if ((val & 0200) && inforeground == 1 && + ((val & ~0200) == SIGINT || (val & ~0200) == SIGQUIT)) { if (!errbrk_saved) { errbrk_saved = 1; prev_breaks = breaks; @@ -399,7 +400,8 @@ update_job(Job jn) adjustwinsize(0); } } - } else if (list_pipe && (val & 0200) && inforeground == 1) { + } else if (list_pipe && (val & 0200) && inforeground == 1 && + ((val & ~0200) == SIGINT || (val & ~0200) == SIGQUIT)) { if (!errbrk_saved) { errbrk_saved = 1; prev_breaks = breaks; -- cgit 1.4.1