bin/81165: /bin/sh -e bug
keramida at ceid.upatras.gr
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 ceid.upatras.gr>
To: Simon Marlow <simonmar at gmail.com>
Cc: bug-followup at freebsd.org
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 gmail.com> wrote:
> There is a bug in ash's handling of the -e flag. See the example
> $ cat >test.sh
> if true; then
> false && true
> echo "test succeeded"
> $ /bin/sh -e test.sh
> zsh: 34546 exit 1 /bin/sh -e test.sh
> $ bash -e test.sh
> 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