From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2026 invoked from network); 27 Oct 2000 12:15:47 -0000 Received: from ns2.primenet.com.au (HELO primenet.com.au) (?o+omQyKSFDzK1qVYRP8qk5M7z6pIiqg/?@203.24.36.3) by ns1.primenet.com.au with SMTP; 27 Oct 2000 12:15:47 -0000 Received: (qmail 4461 invoked from network); 27 Oct 2000 12:10:44 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns2.primenet.com.au with SMTP; 27 Oct 2000 12:10:44 -0000 Received: (qmail 20068 invoked by alias); 27 Oct 2000 11:49:25 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3483 Received: (qmail 20061 invoked from network); 27 Oct 2000 11:49:25 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer david.siemens.de) From: "Andrej Borsenkow" To: "Akim Demaille" , Subject: RE: Trap and exit Date: Fri, 27 Oct 2000 15:49:22 +0400 Message-ID: <000101c0400b$f2563dd0$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal In-Reply-To: <000001c0400a$54f99fb0$21c9ca95@mow.siemens.ru> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 > > #! /bin/sh > > trap 'echo trap: $?' 0 > > exit 59 > > /tmp % ash ./foo.sh > > trap: 59 > > It looks like a bug in Zsh. Quoting Unix 98: > OTOH both sh and ksh here behave the same as Zsh. Unless there are compatibility reasons, I still prefer sh/bash. -andrej