summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Src/jobs.c9
2 files changed, 14 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 5446378ce..83788121d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-07-23 Barton E. Schaefer <schaefer@zsh.org>
+
+ * 38923 (plus expanded comment): Src/jobs.c: zwaitjob() continues
+ waiting for children that may have ignored the interrupt signal,
+ even if the current shell has been interrupted.
+
2016-07-22 Daniel Shahaf <d.s@daniel.shahaf.name>
* users/21779: Doc/Zsh/expn.yo: Clarify documentation of the
diff --git a/Src/jobs.c b/Src/jobs.c
index 3db2ed01f..6bc361609 100644
--- a/Src/jobs.c
+++ b/Src/jobs.c
@@ -1472,7 +1472,7 @@ zwaitjob(int job, int wait_cmd)
*/
pipecleanfilelist(jn->filelist, 0);
}
- while (!errflag && jn->stat &&
+ while (!(errflag & ERRFLAG_ERROR) && jn->stat &&
!(jn->stat & STAT_DONE) &&
!(interact && (jn->stat & STAT_STOPPED))) {
signal_suspend(SIGCHLD, wait_cmd);
@@ -1494,6 +1494,13 @@ zwaitjob(int job, int wait_cmd)
that's the one related to ^C. But that doesn't work.
There's something more here we don't understand. --pws
+ The change above to ignore ERRFLAG_INT in the loop test
+ solves a problem wherein child processes that ignore the
+ INT signal were never waited-for. Clearing the flag here
+ still seems the wrong thing, but perhaps ERRFLAG_INT
+ should be saved and restored around signal_suspend() to
+ prevent it being lost within a signal trap? --Bart
+
errflag = 0; */
if (subsh) {