From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3) with ESMTP id RAA07413 for ; Wed, 17 Apr 1996 17:50:28 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id DAA03690; Wed, 17 Apr 1996 03:32:38 -0400 (EDT) Resent-Date: Wed, 17 Apr 1996 03:32:38 -0400 (EDT) Message-Id: <199604170732.JAA27188@hydra.ifh.de> To: zsh-workers@math.gatech.edu Subject: Re: Wrong Exit Codes? In-reply-to: "esky@cs.ucla.edu"'s message of "Tue, 16 Apr 1996 12:31:12 MET." <9604161931.AA10844@marathon.cs.ucla.edu> Date: Wed, 17 Apr 1996 09:32:22 +0200 From: Peter Stephenson Resent-Message-ID: <"VSsGO.0.av.Lw9Tn"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/935 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu esky@cs.ucla.edu wrote: > Is this a bug or a feature (I would call it a bug, unless there is an > option to turn this behavior off): > > If the previous command causes an error, then typing "exit" will exit > zsh (2.6 beta14) with the previous command's non-zero exit code. This is what the manual says it does. It's also what the sh manual says. It seems to be standard behaviour. Even the csh manual page claims it does the same thing, except it actually doesn't (at least not here). exit [ n ] Exit the shell with the exit code specified by n; if none is specified, use the exit code from the last command executed. An EOF condition will also cause the shell to exit, unless the IGNOREEOF option is set. -- Peter Stephenson Tel: +49 33762 77366 WWW: http://www.ifh.de/~pws/ Fax: +49 33762 77330 Deutches Electronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen DESY-IfH, 15735 Zeuthen, Germany.