From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12255 invoked from network); 15 May 1997 16:05:06 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 15 May 1997 16:05:06 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id LAA23828; Thu, 15 May 1997 11:48:41 -0400 (EDT) Resent-Date: Thu, 15 May 1997 11:48:41 -0400 (EDT) From: Zoltan Hidvegi Message-Id: <199705151547.LAA00880@hzoli.home> Subject: Re: stopping "wait" in (sub)script ? In-Reply-To: <970515035240.ZM381@candle.brasslantern.com> from Bart Schaefer at "May 15, 97 03:52:39 am" To: zsh-workers@math.gatech.edu (Zsh hacking and development) Date: Thu, 15 May 1997 11:47:16 -0400 (EDT) X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"FoVca1.0.Cq5.O1pUp"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3152 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu > On May 15, 11:07am, Peter Stephenson wrote: > } This doesn't seem to fix this particular bug here, it's still > } uninterruptible. On the other hand, replacing `cat ss` with $( } has always worked. That doesn't leave much code in getoutput() to > } make the difference. > > I think the problem must be in signal_suspend(). The only difference > between the two cases in getoutput() is that $( child_unblock(), whereas `cat ss` does it implicitly via child_suspend(0). > > If you go look at signal_suspend(), you'll find a lot of #ifdefs for the > assorted signal handling variations. I'll bet this problem is specific > to one or more of those variations. No. The problem is that $(...) does not enter the new process to the process table. $(<...) does not fork, so it is not surprising that it works. The problem is that `cat ss` forks, and does an entersubsh after the fork(). When a process terminates the SIGCHLD handler calls update_job, which should reattach the terminal, but it does not do that since the terminated job was not in the process table so update_job() is not even called :-(. I'll try to figure out a better solution tonight (by that time it'll be tomorrow in Europe). Zoltan