bin/81165: /bin/sh -e bug

Giorgos Keramidas keramida at
Tue May 17 18:40:17 GMT 2005

The following reply was made to PR bin/81165; it has been noted by GNATS.

From: Giorgos Keramidas <keramida at>
To: Simon Marlow <simonmar at>
Cc: bug-followup at
Subject: Re: bin/81165: /bin/sh -e bug
Date: Tue, 17 May 2005 21:34:45 +0300

 On 2005-05-17 17:20, Simon Marlow <simonmar at> wrote:
 > There is a bug in ash's handling of the -e flag.  See the example
 > below.
 > $ cat >
 > if true; then
 >   false && true
 > fi
 > echo "test succeeded"
 > $ /bin/sh -e
 > zsh: 34546 exit 1     /bin/sh -e
 > $ bash -e
 > test succeeded
 > Bash works correctly.  If the 'if' statement is removed, ash also
 > works correctly.
 Are you sure what bash does is correct?  What do the standards say about
 indermediate commands that fail and the correct behavior of the "shell"
 (i.e. the "false" command in there)?

More information about the freebsd-bugs mailing list