Date: Tue, 17 May 2005 18:40:05 GMT From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/81165: /bin/sh -e bug Message-ID: <200505171840.j4HIe58i033474@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/81165; it has been noted by GNATS. From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: Simon Marlow <simonmar@gmail.com> Cc: bug-followup@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@gmail.com> wrote: > There is a bug in ash's handling of the -e flag. See the example > below. > > $ cat >test.sh > if true; then > false && true > fi > 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)?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200505171840.j4HIe58i033474>