From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-workers@zsh.org
Subject: Re: jobs -r doesn't show jobs continued by kill -CONT
Date: Mon, 4 May 2015 18:36:47 +0100 [thread overview]
Message-ID: <20150504183647.687c0c1e@ntlworld.com> (raw)
In-Reply-To: <20150503225212.GA2752@localhost.localdomain>
On Mon, 4 May 2015 06:52:13 +0800
Han Pingtian <hanpt@linux.vnet.ibm.com> wrote:
> jobs -r doesn't show a job which suspended the continued by kill -CONT:
Not sure whether to use makerunning() here. It's handled per process
rather than per job at this point, so it's not entirely clear at what
point the STAT_STOPPED flag should be removed, either.
pws
diff --git a/Src/jobs.c b/Src/jobs.c
index 295f4c9..948f61b 100644
--- a/Src/jobs.c
+++ b/Src/jobs.c
@@ -421,8 +421,10 @@ update_job(Job jn)
for (pn = jn->procs; pn; pn = pn->next) {
#ifdef WIFCONTINUED
- if (WIFCONTINUED(pn->status))
+ if (WIFCONTINUED(pn->status)) {
+ jn->stat &= ~STAT_STOPPED;
pn->status = SP_RUNNING;
+ }
#endif
if (pn->status == SP_RUNNING) /* some processes in this job are running */
return; /* so no need to update job table entry */
next prev parent reply other threads:[~2015-05-04 17:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-03 22:52 Han Pingtian
2015-05-04 6:26 ` Bart Schaefer
2015-05-04 17:36 ` Peter Stephenson [this message]
2015-05-05 19:02 ` Bart Schaefer
2015-05-05 19:14 ` Peter Stephenson
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=20150504183647.687c0c1e@ntlworld.com \
--to=p.w.stephenson@ntlworld.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).