From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1521 invoked from network); 21 Jun 1999 11:20:57 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 21 Jun 1999 11:20:57 -0000 Received: (qmail 11615 invoked by alias); 21 Jun 1999 11:20:31 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6755 Received: (qmail 11608 invoked from network); 21 Jun 1999 11:20:30 -0000 Date: Mon, 21 Jun 1999 13:20:10 +0200 (MET DST) Message-Id: <199906211120.NAA22572@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Bart Schaefer"'s message of Sat, 19 Jun 1999 05:35:03 +0000 Subject: Re: Small problem with suspend-a-loop patch (6707) Bart Schaefer wrote: > The first time a loop is suspended and then brought back into the foreground, > the job status is reported incorrectly; every time thereafter it's correct. Oh. there was this explicit test to avoid setting the status of the last process of a super-job to SP_RUNNING (the last process is the shell forked for the tail of a pipeline). I don't remember why we had this test, so I only #if'ed it out for now. Stopping/continuing loops with and without pipes seems to reported the status correclty with that, but please look out for wrong reports everyone. Bye Sven --- os/jobs.c Mon Jun 21 12:49:40 1999 +++ Src/jobs.c Mon Jun 21 13:13:34 1999 @@ -92,8 +92,12 @@ jn->stat &= ~STAT_STOPPED; for (pn = jn->procs; pn; pn = pn->next) +#if 0 if (WIFSTOPPED(pn->status) && (!(jn->stat & STAT_SUPERJOB) || pn->next)) + pn->status = SP_RUNNING; +#endif + if (WIFSTOPPED(pn->status)) pn->status = SP_RUNNING; if (jn->stat & STAT_SUPERJOB) -- Sven Wischnowsky wischnow@informatik.hu-berlin.de