From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9202 invoked from network); 14 Jun 2000 16:20:58 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 14 Jun 2000 16:20:58 -0000 Received: (qmail 7848 invoked by alias); 14 Jun 2000 16:20:43 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11904 Received: (qmail 7836 invoked from network); 14 Jun 2000 16:20:42 -0000 From: "Bart Schaefer" Message-Id: <1000614161737.ZM17079@candle.brasslantern.com> Date: Wed, 14 Jun 2000 16:17:37 +0000 In-Reply-To: <0FW500762GQFIK@la-la.cambridgesiliconradio.com> Comments: In reply to Peter Stephenson "Re: Wordcode functions with empty bodies" (Jun 14, 4:08pm) References: <0FW500762GQFIK@la-la.cambridgesiliconradio.com> X-Mailer: Z-Mail (5.0.0 30July97) To: Peter Stephenson , zsh-workers@sunsite.auc.dk (Zsh hackers list) Subject: Re: Wordcode functions with empty bodies MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jun 14, 4:08pm, Peter Stephenson wrote: } Subject: Re: Wordcode functions with empty bodies } } > Continue, it hits endtrapscode() and from there } > frees the eprog in sigfuncs[28]. BUT it doesn't reset sigfuncs[28]. } } Oh, I see, sorry. The answer is it should disappear from there at the } point where it would do with an ordinary (non-function) trap. [...] } } Ideally this value shouldn't be used anyway, because sigtrapped[SIGWINCH] } is now clear. That was a problem in dosavetrap() --- it was correct to } save the trap, because it needs something to prompt it to delete the local } trap even if it just unsets it, but it should have checked sigtrapped to } see if the sigfuncs value was valid. This has fixed the "prompt bart" crash, though I still don't quite follow why putting a `:' command in the function body (instead of using an empty function) prevented the crash before. However, either Clint's 11839 or my 11857 is still needed to prevent the crash reported in 11837, so there's still something fishy going on with saving and restoring the EXIT trap. Or else the lack of 11857 _is_ the fishy thing that's going on, but I don't follow how the ZSIG_FUNC bit is set when there is no function. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net