From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16097 invoked from network); 27 Oct 2000 11:15:14 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 27 Oct 2000 11:15:14 -0000 Received: (qmail 16519 invoked by alias); 27 Oct 2000 11:14:55 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3481 Received: (qmail 16512 invoked from network); 27 Oct 2000 11:14:55 -0000 To: zsh-users@sunsite.auc.dk Date: 27 Oct 2000 12:44:36 +0200 From: Akim Demaille Message-ID: Organization: EPITA / LRDE MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Trap and exit Sender: news I am not claiming this is a bug in Zsh, but I confess I prefer the behavior from Bash and Ash. /tmp % cat foo.sh nostromo 12:42 #! /bin/sh trap 'echo trap: $?' 0 exit 59 /tmp % ash ./foo.sh nostromo 12:42 trap: 59 /tmp % bash ./foo.sh nostromo Err 59 trap: 59 /tmp % zsh ./foo.sh nostromo Err 59 trap: 0 /tmp % nostromo Err 59 What do you think?