summaryrefslogtreecommitdiffstats
path: root/Src/jobs.c
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2009-07-20 04:38:56 +0000
committerBart Schaefer <barts@users.sourceforge.net>2009-07-20 04:38:56 +0000
commitbda90c969f009332956adee965fe00c420f5f7de (patch)
treeb29b21cf2be47f0473a580cfa9ae7514948110d7 /Src/jobs.c
parent27167: add POSIX_CD option to test "." after CDPATH (diff)
downloadzsh-bda90c969f009332956adee965fe00c420f5f7de.tar
zsh-bda90c969f009332956adee965fe00c420f5f7de.tar.gz
zsh-bda90c969f009332956adee965fe00c420f5f7de.tar.bz2
zsh-bda90c969f009332956adee965fe00c420f5f7de.tar.lz
zsh-bda90c969f009332956adee965fe00c420f5f7de.tar.xz
zsh-bda90c969f009332956adee965fe00c420f5f7de.tar.zst
zsh-bda90c969f009332956adee965fe00c420f5f7de.zip
27159: restore pre-23067 behavior of SIGINT outside a "wait", so that
foreground jobs that handle or ignore interrupts are not orphaned.
Diffstat (limited to 'Src/jobs.c')
-rw-r--r--Src/jobs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/jobs.c b/Src/jobs.c
index df7d9d689..d5658d2eb 100644
--- a/Src/jobs.c
+++ b/Src/jobs.c
@@ -1191,7 +1191,7 @@ waitforpid(pid_t pid, int wait_cmd)
kill(pid, SIGCONT);
last_signal = -1;
- signal_suspend(SIGCHLD);
+ signal_suspend(SIGCHLD, wait_cmd);
if (last_signal != SIGCHLD && wait_cmd && last_signal >= 0 &&
(sigtrapped[last_signal] & ZSIG_TRAPPED)) {
/* wait command interrupted, but no error: return */
@@ -1230,7 +1230,7 @@ zwaitjob(int job, int wait_cmd)
while (!errflag && jn->stat &&
!(jn->stat & STAT_DONE) &&
!(interact && (jn->stat & STAT_STOPPED))) {
- signal_suspend(SIGCHLD);
+ signal_suspend(SIGCHLD, wait_cmd);
if (last_signal != SIGCHLD && wait_cmd && last_signal >= 0 &&
(sigtrapped[last_signal] & ZSIG_TRAPPED))
{