From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17506 invoked from network); 29 Apr 2004 02:16:52 -0000 Received: from thor.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.86) by ns1.primenet.com.au with SMTP; 29 Apr 2004 02:16:52 -0000 Received: (qmail 14220 invoked from network); 29 Apr 2004 02:16:34 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 29 Apr 2004 02:16:34 -0000 Received: (qmail 25499 invoked by alias); 29 Apr 2004 02:16:30 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19848 Received: (qmail 25489 invoked from network); 29 Apr 2004 02:16:29 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 29 Apr 2004 02:16:29 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [130.225.247.86] by sunsite.dk (MessageWall 1.0.8) with SMTP; 29 Apr 2004 2:16:29 -0000 Received: (qmail 13864 invoked from network); 29 Apr 2004 02:16:29 -0000 Received: from lakermmtao06.cox.net (68.230.240.33) by a.mx.sunsite.dk with SMTP; 29 Apr 2004 02:16:25 -0000 Received: from quark.hightek.org ([68.12.75.33]) by lakermmtao06.cox.net (InterMail vM.6.01.03.02 201-2131-111-104-20040324) with ESMTP id <20040429021557.CAVR19374.lakermmtao06.cox.net@quark.hightek.org> for ; Wed, 28 Apr 2004 22:15:57 -0400 Received: by quark.hightek.org (Postfix, from userid 501) id 3789612408; Wed, 28 Apr 2004 21:16:29 -0500 (CDT) Date: Wed, 28 Apr 2004 21:16:29 -0500 From: Vincent Stemen To: Zsh hackers list Subject: Re: PATCH: (2) Re: FreeBSD compatability feature request Message-ID: <20040429021629.GA16141@quark.hightek.org> References: <1040427035642.ZM27361@candle.brasslantern.com> <12706.1083059939@csr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <12706.1083059939@csr.com> User-Agent: Mutt/1.4.1i X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: * X-Spam-Status: No, hits=1.5 required=6.0 tests=RCVD_IN_SORBS autolearn=no version=2.63 X-Spam-Hits: 1.5 On Tue, Apr 27, 2004 at 10:58:59AM +0100, Peter Stephenson wrote: > Bart Schaefer wrote: > > On Apr 22, 11:17am, Peter Stephenson wrote: > > } > > } If anybody actually knows anything about all this, their views would be > > } especially welcome. > > > > This sounds like something to ask about on the > > list. > > It's not so much the standard as implementing an alternative in a > consistent way that I'm worried about. > > However, there is a difference in the current implementation: > > $ fn() { sleep 5; kill -USR1 $$; } > $ trap 'echo USR1 fired' USR1 > $ fn & sleep 10 > > ksh (88), bash and Solaris sh wait till the end of the sleep before > delivering the `USR1 fired' (and, where appropriate, sending the > notification message). In zsh they appear in the middle. That's > because the exiting background process gives a SIGCHLD and we don't care > which child exits, we just go into end-of-job-processing mode, then > return to wait for the foreground process when we find that's not the > one that exited. > > I don't know if this is important enough to worry about. I tested this under /bin/sh on FreeBSD and it also behaves the same as bash and the others. Even though, unless I am missing something here, zsh seems to have the most appropriate behavior. I don't quite understand why the others don't immediately process the signal. As long as you are not blocking the signal I would expect it to print the 'echo USR1 fired' message as soon as it receives the signal whether it is in the middle of a sleep or any other command. Vincent -- Vincent Stemen Avoid the VeriSign/Network Solutions domain registration trap! Read how Network Solutions (NSI) was involved in stealing our domain name. http://www.InetAddresses.net