From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3889 invoked from network); 10 Nov 2006 15:58:26 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) 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.7 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 10 Nov 2006 15:58:26 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 15575 invoked from network); 10 Nov 2006 15:58:19 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 10 Nov 2006 15:58:19 -0000 Received: (qmail 12701 invoked by alias); 10 Nov 2006 15:58:17 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22994 Received: (qmail 12692 invoked from network); 10 Nov 2006 15:58:16 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 10 Nov 2006 15:58:16 -0000 Received: (qmail 15275 invoked from network); 10 Nov 2006 15:58:16 -0000 Received: from vms042pub.verizon.net (206.46.252.42) by a.mx.sunsite.dk with SMTP; 10 Nov 2006 15:58:11 -0000 Received: from torch.brasslantern.com ([71.116.118.106]) by vms042.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0J8I009USV0WNXKA@vms042.mailsrvcs.net> for zsh-workers@sunsite.dk; Fri, 10 Nov 2006 09:58:09 -0600 (CST) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id kAAFw8gk004617 for ; Fri, 10 Nov 2006 07:58:08 -0800 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id kAAFw87F004616 for zsh-workers@sunsite.dk; Fri, 10 Nov 2006 07:58:08 -0800 Date: Fri, 10 Nov 2006 07:58:08 -0800 From: Bart Schaefer Subject: Re: PATCH: exit status In-reply-to: <200611100940.kAA9ewZY012583@news01.csr.com> To: zsh-workers@sunsite.dk (Zsh hackers list) Message-id: <061110075808.ZM4615@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <200611100940.kAA9ewZY012583@news01.csr.com> Comments: In reply to Peter Stephenson "PATCH: exit status" (Nov 10, 9:40am) On Nov 10, 9:40am, Peter Stephenson wrote: } } A thread on the Austin group suggests the exit status of the shell } should be available in exit traps. I'm leaning towards Don Cragun's camp (the prior-to-this-patch zsh behavior) on this one. I think the answer (and a general issue about the new hook functions, incidentally) is tied to the answer to this other question: What is the final exit status of the shell when the exit trap itself calls exit? If trap 'exit 42' EXIT; exit 1 returns 42 to the calling environment, then Korn and the GNU guys are correct. If it exits 1, then Don Cragun is correct. Similarly, what happens if the zshexit hook calls exit? What happens if the zshexit hook calls "return 37"?