From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20043 invoked from network); 21 Feb 2006 04:06:43 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.0 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 21 Feb 2006 04:06:43 -0000 Received: (qmail 79888 invoked from network); 21 Feb 2006 04:06:37 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 21 Feb 2006 04:06:37 -0000 Received: (qmail 19426 invoked by alias); 21 Feb 2006 04:06:34 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22295 Received: (qmail 19417 invoked from network); 21 Feb 2006 04:06:33 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 21 Feb 2006 04:06:33 -0000 Received: (qmail 79643 invoked from network); 21 Feb 2006 04:06:33 -0000 Received: from vms046pub.verizon.net (206.46.252.46) by a.mx.sunsite.dk with SMTP; 21 Feb 2006 04:06:32 -0000 Received: from candle.brasslantern.com ([71.116.81.225]) by vms046.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0IV000FGEREU9W24@vms046.mailsrvcs.net> for zsh-workers@sunsite.dk; Mon, 20 Feb 2006 22:06:31 -0600 (CST) Received: from candle.brasslantern.com (IDENT:schaefer@localhost [127.0.0.1]) by candle.brasslantern.com (8.12.11/8.12.11) with ESMTP id k1L46Tcn024176 for ; Mon, 20 Feb 2006 20:06:29 -0800 Received: (from schaefer@localhost) by candle.brasslantern.com (8.12.11/8.12.11/Submit) id k1L46TXx024175 for zsh-workers@sunsite.dk; Mon, 20 Feb 2006 20:06:29 -0800 Date: Tue, 21 Feb 2006 04:06:29 +0000 From: Bart Schaefer Subject: Re: [4.2/4.3] Bug with wait and trapped signals In-reply-to: <200602181731.k1IHVoxk010917@pwslaptop.csr.com> To: zsh-workers@sunsite.dk Message-id: <1060221040629.ZM24174@candle.brasslantern.com> MIME-version: 1.0 X-Mailer: Z-Mail (5.0.0 30July97) Content-type: text/plain; charset=us-ascii References: <200602181731.k1IHVoxk010917@pwslaptop.csr.com> Comments: In reply to Peter Stephenson "Re: [4.2/4.3] Bug with wait and trapped signals" (Feb 18, 5:31pm) On Feb 18, 5:31pm, Peter Stephenson wrote: } } I would prefer if there was someone more proficient in the dark art of } signals to look at this. I don't know whether I qualify or not, but it looks mostly OK to me. I may even be able to answer this old question: } +#ifdef POSIX_SIGNALS } + sigdelset(set, SIGHUP); /* still don't know why we add this? */ } +#endif The reason for this is so that the shell exits properly if the terminal is disconnected (window closed, whatever) during the wait. } I also inserted an "else" which seemed to want to be present where it's } marked "HERE" (another CSR habit). I think the intention there is to reap any other jobs that exited while we were waiting for the specified job, because we won't get the normal SIGCHLD signals for those. However, I'm note entirely sure that was necessary or that it accomplished what it meant to.