From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14549 invoked by alias); 11 Jan 2011 15:39:20 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 28628 Received: (qmail 17312 invoked from network); 11 Jan 2011 15:39:18 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <110111073854.ZM1766@torch.brasslantern.com> Date: Tue, 11 Jan 2011 07:38:54 -0800 In-reply-to: <20110111093829.115a9c96@pwslap01u.europe.root.pri> Comments: In reply to Peter Stephenson "Re: 4.3.11 TRAPEXIT() on cygwin" (Jan 11, 9:38am) References: <1294704977.26846.1414490063@webmail.messagingengine.com> <1294710389.18824.1414500371@webmail.messagingengine.com> <1294714469.3446.1414534693@webmail.messagingengine.com> <20110111093829.115a9c96@pwslap01u.europe.root.pri> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Subject: Re: 4.3.11 TRAPEXIT() on cygwin MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Jan 11, 9:38am, Peter Stephenson wrote: } } This tries to summarize the differences I know about. The other thing worth mentioning is that you can't have both of them at once. If you set a list trap, it supplants the function trap in the same scope, and vice-versa. Also you can't restore the previously scoped trap by removing the new one -- "unfunction TRAPEXIT" deletes the trap entirely. This, however, might be a bug: ---- % trap 'print list' EXIT; unfunction TRAPEXIT; print exiting; exit unfunction: no such hash table element: TRAPEXIT exiting ---- Removing the TRAPEXIT function deletes the EXIT list trap even if there is no TRAPEXIT function.