From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1546 invoked from network); 23 Apr 2004 05:30:53 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 23 Apr 2004 05:30:53 -0000 Received: (qmail 18990 invoked by alias); 23 Apr 2004 05:30:46 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19817 Received: (qmail 18952 invoked from network); 23 Apr 2004 05:30:45 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 23 Apr 2004 05:30:45 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [130.225.247.86] by sunsite.dk (MessageWall 1.0.8) with SMTP; 23 Apr 2004 5:30:45 -0000 Received: (qmail 20271 invoked from network); 23 Apr 2004 05:30:45 -0000 Received: from lakermmtao12.cox.net (68.230.240.27) by a.mx.sunsite.dk with SMTP; 23 Apr 2004 05:30:41 -0000 Received: from quark.hightek.org ([68.12.75.33]) by lakermmtao12.cox.net (InterMail vM.6.01.03.02 201-2131-111-104-20040324) with ESMTP id <20040423053013.BQTD164.lakermmtao12.cox.net@quark.hightek.org> for ; Fri, 23 Apr 2004 01:30:13 -0400 Received: by quark.hightek.org (Postfix, from userid 501) id 1108412408; Fri, 23 Apr 2004 00:30:45 -0500 (CDT) Date: Fri, 23 Apr 2004 00:30:44 -0500 From: Vincent Stemen To: Zsh hackers list Subject: Re: PATCH: (2) Re: FreeBSD compatability feature request Message-ID: <20040423053044.GA75851@quark.hightek.org> References: <17122.1082627997@csr.com> <10937.1082629039@csr.com> <20040422160957.GC45277@lizzy.catnook.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040422160957.GC45277@lizzy.catnook.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=BAYES_44,RCVD_IN_SORBS autolearn=no version=2.63 X-Spam-Hits: 1.5 On Thu, Apr 22, 2004 at 09:09:35AM -0700, Jos Backus wrote: > On Thu, Apr 22, 2004 at 11:17:19AM +0100, Peter Stephenson wrote: > > If anybody actually knows anything about all this, their views would be > > especially welcome. > > Does this help? > > http://www.cons.org/cracauer/sigint.html > > (Martin Cracauer has been maintaining the FreeBSD /bin/sh on and off.) That is an informative article. It includes an interesting section on "How to be a proper shell". However, I didn't see any reference to implementing asynchronous signal traps. I did find another article that discusses process waiting and might have helpful information. http://www.cs.pdx.edu/~jrb/cs303/handouts/on.wait I also don't have a full understanding of all aspects of signal handling, but it looks to me like in order to implement trapsasync mode, it would involve using the WNOHANG option to waitpid() or wait3() or wait4() to periodically check the child status without blocking the parent until the child exits. That way I am guessing you can immediately receive signals in the parent and kill the child, exit, or whatever. My question is, does that affect the child's ability to be interactive. I saw a place in the zsh code where WNOHANG was being used in a call to WAIT() in signals.c:zhandler() but I havn't studied the code well enough to understand what it is doing or whether that is the relevant area of code relating to trapsasync. -- 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