From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13292 invoked from network); 16 Jun 2004 19:18:06 -0000 Received: from thor.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.86) by ns1.primenet.com.au with SMTP; 16 Jun 2004 19:18:06 -0000 Received: (qmail 3406 invoked from network); 16 Jun 2004 19:17:58 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 16 Jun 2004 19:17:58 -0000 Received: (qmail 18061 invoked by alias); 16 Jun 2004 19:17:50 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20062 Received: (qmail 18052 invoked from network); 16 Jun 2004 19:17:50 -0000 Received: from thor.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.86) by sunsite.dk with SMTP; 16 Jun 2004 19:17:47 -0000 Received: (qmail 3151 invoked from network); 16 Jun 2004 19:17:46 -0000 Received: from 209-128-98-052.bayarea.net (HELO Yost.com) (209.128.98.52) by a.mx.sunsite.dk with SMTP; 16 Jun 2004 19:17:45 -0000 Received: from [192.168.1.2] (unknown [192.168.1.1]) by Yost.com (Postfix) with ESMTP id 1FFBC2381E6; Wed, 16 Jun 2004 12:17:28 -0700 (PDT) Mime-Version: 1.0 X-Sender: yost@ip4.yost.com Message-Id: In-Reply-To: <200406081320.i58DKROp011482@news01.csr.com> References: <200406081320.i58DKROp011482@news01.csr.com> Date: Wed, 16 Jun 2004 12:13:08 -0700 To: Peter Stephenson From: Dave Yost Subject: Re: zsh malloc bug Cc: zsh-workers@sunsite.dk Content-Type: text/plain; charset="us-ascii" X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 At 2:20 PM +0100 2004-06-08, Peter Stephenson wrote: >Dave Yost wrote: >> zsh 4.2.0 hangs on my cygwin system when I try some of these scenarios. > >I couldn't get this to happen on Solaris 8 or Fedora Core 1. I would be >a bit suspicious about Cygwin, since they had to jump through lots of >hoops to make it look like a UNIX environment. It happens on Mac OS X. > >> BTW, the TRAPxxx documentation should be more explicit about whether trapping >> the event prevents exit > >Yes, it should say how the return status is handled and apparently it >doesn't. That's a big omission. Not anymore! Thanks for updating the doc and for sending the update along. Dave ============== revised source ============================== #!/bin/zsh TRAPINT() { echo Interrupted exit 2 } TRAPZERR() { reason=$? echo Failed command. exit $reason } TRAPEXIT() { echo exited normally } sleep $1 # Try ^C here sometimes. echo after sleep set -e cp echo after command