From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29173 invoked from network); 3 Aug 2008 11:51:09 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 3 Aug 2008 11:51:09 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 62385 invoked from network); 3 Aug 2008 11:51:05 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 3 Aug 2008 11:51:05 -0000 Received: (qmail 1278 invoked by alias); 3 Aug 2008 11:50:44 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25380 Received: (qmail 1252 invoked from network); 3 Aug 2008 11:50:40 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 3 Aug 2008 11:50:40 -0000 Received: from mtaout01-winn.ispmail.ntl.com (mtaout01-winn.ispmail.ntl.com [81.103.221.47]) by bifrost.dotsrc.org (Postfix) with ESMTP id C52FF80590E6 for ; Sun, 3 Aug 2008 13:50:36 +0200 (CEST) Received: from aamtaout02-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout01-winn.ispmail.ntl.com with ESMTP id <20080803115036.NOIB777.mtaout01-winn.ispmail.ntl.com@aamtaout02-winn.ispmail.ntl.com> for ; Sun, 3 Aug 2008 12:50:36 +0100 Received: from pws-pc ([81.107.40.67]) by aamtaout02-winn.ispmail.ntl.com with ESMTP id <20080803115036.ETTE19289.aamtaout02-winn.ispmail.ntl.com@pws-pc> for ; Sun, 3 Aug 2008 12:50:36 +0100 Date: Sun, 3 Aug 2008 12:50:33 +0100 From: Peter Stephenson To: zsh-workers@sunsite.dk Subject: Re: Weird exit caused in a trap DEBUG which sources a file. Message-ID: <20080803125033.4f9a7565@pws-pc> In-Reply-To: <6cd6de210808030428odaee1e6ja511305c6dd4ac46@mail.gmail.com> References: <6cd6de210807301938m28e05c84vf6296aa5b1bc0d44@mail.gmail.com> <200807310901.m6V91g8T002478@news01.csr.com> <6cd6de210807310305q5954b65ax405f51e54d6754ee@mail.gmail.com> <6cd6de210808010529h11898619kba301fddf8b72f00@mail.gmail.com> <20080801143747.19b65086@news01> <6cd6de210808010821g3117fe62y82bd580811dbba8a@mail.gmail.com> <200808011531.m71FVIFl028545@news01.csr.com> <6cd6de210808020421k78d716a0mc995862eb761ea2@mail.gmail.com> <20080803114215.219b616a@pws-pc> <6cd6de210808030428odaee1e6ja511305c6dd4ac46@mail.gmail.com> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.92.1/7920/Sun Aug 3 10:44:32 2008 on bifrost X-Virus-Status: Clean On Sun, 3 Aug 2008 07:28:37 -0400 "Rocky Bernstein" wrote: > I do not see why this is semantically complicated when the trap DEBUG > occurs before the statement it refers to is run. Can you give a very > specific example of something you feel is tricky? You mean that the new return value from a DEBUG trap should skip everything that would happen until the next trap is run? That's kind of what I ended up saying, and that's well-defined. > David Korn made a mistake and he says so. Chet Ramey also says he > changed the behavior because he thought it a mistake too. zsh copied > the mistake. The only claim I've heard for keeping the mistake is > compatibility with previous versions of zsh. However right now there > is no evidence that anyone is making use of this mistake that would > not be happier if it weren't made. Well, there's no actual evidence it won't cause the toppling of governments in small Himalayan kingdoms, either. We probably won't find out unless we change the default. I agree setting DEBUG_BEFORE_CMD is generally more useful, but you're the only user of the feature I've heard from at all, and I still don't know if there's anything that makes it hard to set the feature explicitly, in either direction (and at least trying to set it in your script is the only way to guarantee the correct behaviour). If you're going to produce a working debugger that requires this to be set then I'll be very tempted to change the default, since a generally available working debugger is extremely useful. Any definite views from anyone else are welcome. -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/