From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2342 invoked by alias); 4 May 2015 17:42:24 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 35032 Received: (qmail 3903 invoked from network); 4 May 2015 17:42:21 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-Originating-IP: [80.3.228.158] X-Spam: 0 X-Authority: v=2.1 cv=dJgomYpb c=1 sm=1 tr=0 a=P+FLVI8RzFchTbbqTxIDRw==:117 a=P+FLVI8RzFchTbbqTxIDRw==:17 a=kj9zAlcOel0A:10 a=NLZqzBF-AAAA:8 a=VnNF1IyMAAAA:8 a=zSfBmxZOGcu9UhK0lWoA:9 a=CjuIK1q_8ugA:10 Date: Mon, 4 May 2015 18:36:47 +0100 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: jobs -r doesn't show jobs continued by kill -CONT Message-ID: <20150504183647.687c0c1e@ntlworld.com> In-Reply-To: <20150503225212.GA2752@localhost.localdomain> References: <20150503225212.GA2752@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 4 May 2015 06:52:13 +0800 Han Pingtian 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 */