about summary refs log tree commit diff
path: root/Src/jobs.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2005-06-28 09:37:21 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2005-06-28 09:37:21 +0000
commita6660cadc66f21a9fcbf1f388f2c163c0561b53a (patch)
treebd376e0106d338be99e7e1d9fe3bd1b1ee18d8f5 /Src/jobs.c
parent9b9e5a3ac0d9213e112dcf95a272c5a993eef2df (diff)
downloadzsh-a6660cadc66f21a9fcbf1f388f2c163c0561b53a.tar.gz
zsh-a6660cadc66f21a9fcbf1f388f2c163c0561b53a.tar.xz
zsh-a6660cadc66f21a9fcbf1f388f2c163c0561b53a.zip
21391: only pass SIGINT and SIGQUIT from foreground processes to the shell.
Diffstat (limited to 'Src/jobs.c')
-rw-r--r--Src/jobs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Src/jobs.c b/Src/jobs.c
index f5ade7c2b..a22a8a6a8 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;