From owner-freebsd-bugs@FreeBSD.ORG Tue May 17 18:40:17 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A37AA16A4CE for ; Tue, 17 May 2005 18:40:17 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7CD5443D6A for ; Tue, 17 May 2005 18:40:17 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j4HIe5pD033475 for ; Tue, 17 May 2005 18:40:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j4HIe58i033474; Tue, 17 May 2005 18:40:05 GMT (envelope-from gnats) Date: Tue, 17 May 2005 18:40:05 GMT Message-Id: <200505171840.j4HIe58i033474@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Giorgos Keramidas Subject: Re: bin/81165: /bin/sh -e bug X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Giorgos Keramidas List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 May 2005 18:40:17 -0000 The following reply was made to PR bin/81165; it has been noted by GNATS. From: Giorgos Keramidas To: Simon Marlow 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 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)?