From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: signal mask bug?
Date: Thu, 23 Feb 2017 13:39:53 -0800 [thread overview]
Message-ID: <170223133954.ZM22691@torch.brasslantern.com> (raw)
In-Reply-To: <20170216201807.GA3274@lorien.comfychair.org>
On Feb 16, 12:18pm, Danek Duvall wrote:
}
} So my colleague did some digging and found that the process is marked with
} WCONTFLG, and that once that happens, you have to check WIFCONTINUED()
} before anything else, because WCONTFLG overwrites all the bits.
Thanks. Slight variation on the patch:
diff --git a/Src/signals.c b/Src/signals.c
index a717677..68a7ae3 100644
--- a/Src/signals.c
+++ b/Src/signals.c
@@ -522,6 +522,11 @@ wait_for_processes(void)
#if defined(HAVE_WAIT3) && defined(HAVE_GETRUSAGE)
struct timezone dummy_tz;
gettimeofday(&pn->endtime, &dummy_tz);
+#ifdef WIFCONTINUED
+ if (WIFCONTINUED(status))
+ pn->status = SP_RUNNING;
+ else
+#endif
pn->status = status;
pn->ti = ru;
#else
There might be an argument for checking whether the status is already
SP_RUNNING but the above should cover the case of a stopped job that
is sent a SIGCONT from "elsewhere" (i.e., not via fg or bg from the
controlling shell).
prev parent reply other threads:[~2017-02-23 21:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-15 22:17 Danek Duvall
2017-02-16 4:10 ` Bart Schaefer
2017-02-16 9:48 ` Peter Stephenson
2017-02-16 20:18 ` Danek Duvall
2017-02-23 21:39 ` Bart Schaefer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=170223133954.ZM22691@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).