about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPaul Ackersviller <packersv@users.sourceforge.net>2007-05-06 03:45:24 +0000
committerPaul Ackersviller <packersv@users.sourceforge.net>2007-05-06 03:45:24 +0000
commit3ec2e5f38f68c71e8ee4fada26470d8795b1255a (patch)
treef03e0781bb7ca62fdb1b37ce248b1ef08d566f60 /Src
parent2ef304d6f3357d25584813a262ed9d0b7ad277c2 (diff)
downloadzsh-3ec2e5f38f68c71e8ee4fada26470d8795b1255a.tar.gz
zsh-3ec2e5f38f68c71e8ee4fada26470d8795b1255a.tar.xz
zsh-3ec2e5f38f68c71e8ee4fada26470d8795b1255a.zip
Merge of 21391: only pass SIGINT and SIGQUIT from foreground processes to the shell.
Diffstat (limited to 'Src')
-rw-r--r--Src/jobs.c6
1 files changed, 4 insertions, 2 deletions
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;