From owner-freebsd-bugs Wed Mar 18 01:26:20 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA02686 for freebsd-bugs-outgoing; Wed, 18 Mar 1998 01:26:20 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA02678; Wed, 18 Mar 1998 01:26:17 -0800 (PST) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id UAA32209; Wed, 18 Mar 1998 20:24:24 +1100 Date: Wed, 18 Mar 1998 20:24:24 +1100 From: Bruce Evans Message-Id: <199803180924.UAA32209@godzilla.zeta.org.au> To: dancy@franz.com, Studded@dal.net Subject: Re: bin/6047: bash does not handle -e option properly Cc: freebsd-bugs@FreeBSD.ORG, freebsd-gnats-submit@FreeBSD.ORG Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > What are you actually trying to accomplish here? He's trying to to get sh fixed to work properly. Perhaps a better example: --- #!/bin/sh set -e funcfalse() { return 1 } for i in /usr/bin/false false funcfalse do if $i; then echo $i; else echo not $i; fi done --- This handles funcfalse different from the other falses. /bin/sh apparently exits for `return 1' when -e is set. The correctness of this for a POSIX shhell depends on whether `return' is a simple command. I don't think it is. This examples shows why it shouldn't be. The PR should not mention bash in its subject line. bash works right, but /bin/sh doesn't. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message