From owner-freebsd-bugs@FreeBSD.ORG Tue May 17 20:00:32 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 22C6216A4CE for ; Tue, 17 May 2005 20:00:32 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0136543D8D for ; Tue, 17 May 2005 20:00:32 +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 j4HK0SuI042658 for ; Tue, 17 May 2005 20:00:28 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j4HK0Stu042657; Tue, 17 May 2005 20:00:28 GMT (envelope-from gnats) Date: Tue, 17 May 2005 20:00:28 GMT Message-Id: <200505172000.j4HK0Stu042657@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Parv Subject: Re: bin/81165: /bin/sh -e bug X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Parv List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 May 2005 20:00:32 -0000 The following reply was made to PR bin/81165; it has been noted by GNATS. From: Parv To: Simon Marlow Cc: FreeBSD-gnats-submit@FreeBSD.org Subject: Re: bin/81165: /bin/sh -e bug Date: Tue, 17 May 2005 15:53:07 -0400 in message <200505171620.j4HGKVLK034638@sm.dnsalias.com>, wrote Simon Marlow thusly... > > There is a bug in ash's handling of the -e flag. See the example below. > > >How-To-Repeat: > > $ 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. Just a data point ... "test succeeded" is printed by /bin/sh of FreeBSD 5.3-p13, ksh93 20050202, & bash 3.0.16_1. - Parv --