From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24596 invoked from network); 29 Jan 2000 18:13:48 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 29 Jan 2000 18:13:48 -0000 Received: (qmail 15752 invoked by alias); 29 Jan 2000 18:13:42 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9468 Received: (qmail 15741 invoked from network); 29 Jan 2000 18:13:40 -0000 From: "Bart Schaefer" Message-Id: <1000129181329.ZM23114@candle.brasslantern.com> Date: Sat, 29 Jan 2000 18:13:29 +0000 In-Reply-To: <200001181136.MAA00399@beta.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "PATCH: job-control" (Jan 18, 12:36pm) References: <200001181136.MAA00399@beta.informatik.hu-berlin.de> X-Mailer: Z-Mail (5.0.0 30July97) To: Sven Wischnowsky Subject: Re: PATCH: job-control Cc: zsh-workers@sunsite.auc.dk MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii (Yes, I'm still behind.) On Jan 18, 12:36pm, Sven Wischnowsky wrote: } Subject: PATCH: job-control } } Here is the fix for the problem mentioned in 9332. } } The second problem turned out to be two problems. If one hit ^Z early } enough to suspend the cat, the then-sub-shelled loop wasn't continued } and the less wasn't executed. [...] This was because at the time of } the inner waitjobs() child_block() was active so it found out that the } pipe-leader was suspended too late. This is fixed by the hunk that } adds a child_block/unblock() before the waitjobs(). This is the hunk } I'm least happy about. Bart, can you think of any problems with this? The only "problem" is that I can't figure out why it makes any difference. If it really is somehow the case the "it found out that the pipe-leader was suspended too late," then it seems to me that the while() condition in waitjob() is what needs fixing, or we still have a race condition: the ^Z could suspend the pipe-leader between the child_block() and the while() test within waitjob(). All that this change has done is shrink the window. 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(). -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com