summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--Src/jobs.c6
2 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 0acc1460c..63c17687f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-06-28 Peter Stephenson <pws@csr.com>
+
+ * 21391: Src/jobs.c: Restrict passing of signals from foreground
+ processes to the shell to SIGINT and SIGQUIT (i.e. those
+ generated from the keyboard). This removes some unexpected
+ behaviour with SIGPIPE being passed to the shell.
+
2005-06-27 Doug Kearns <djkea2@gus.gscit.monash.edu.au>
* unposted: Completion/Unix/Type/_urls: complete WWW_HOME, ftp_proxy
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;