From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11973 invoked from network); 31 Jan 2000 11:52:16 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 31 Jan 2000 11:52:16 -0000 Received: (qmail 72 invoked by alias); 31 Jan 2000 11:52:07 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9495 Received: (qmail 63 invoked from network); 31 Jan 2000 11:52:06 -0000 From: "Bart Schaefer" Message-Id: <1000131115200.ZM2798@candle.brasslantern.com> Date: Mon, 31 Jan 2000 11:52:00 +0000 In-Reply-To: <200001311000.LAA29263@beta.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "Re: PATCH: job-control" (Jan 31, 11:00am) References: <200001311000.LAA29263@beta.informatik.hu-berlin.de> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: job-control MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jan 31, 11:00am, Sven Wischnowsky wrote: } Subject: Re: PATCH: job-control } } > Also, the child_block() call following the unblock in exec.c is redundant, } > because block/unblock are not stacked and the first thing that waitjobs() } > does [via waitjob()] is to call child_block(). } } Yes, I saw that at the weekend, too (I'm playing with a non-recursive } execution code at home). } } if (!(jn->stat & STAT_LOCKED)) { } child_unblock(); } - child_block(); } waitjobs(); } } Actually, I just realized that that's not right either. It's not safe to go on examining jn->stat and jobtab[list_pipe_job] etc. in the rest of execpline() with child_unblock() in effect (it's left unblocked when waitjobs() returns). So we may end up removing the child_unblock() there, but I think we need to block again after waitjobs(). Index: Src/exec.c =================================================================== @@ -983,6 +983,7 @@ if (!(jn->stat & STAT_LOCKED)) { child_unblock(); waitjobs(); + child_block(); } if (list_pipe_child && jn->stat & STAT_DONE && -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com