From owner-freebsd-bugs Wed Mar 18 01:30:06 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA04354 for freebsd-bugs-outgoing; Wed, 18 Mar 1998 01:30:06 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: (from gnats@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA04312; Wed, 18 Mar 1998 01:30:03 -0800 (PST) (envelope-from gnats) Date: Wed, 18 Mar 1998 01:30:03 -0800 (PST) Message-Id: <199803180930.BAA04312@hub.freebsd.org> To: freebsd-bugs Cc: From: Bruce Evans Subject: Re: bin/6047: bash does not handle -e option properly Reply-To: Bruce Evans Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR bin/6047; it has been noted by GNATS. From: Bruce Evans To: dancy@franz.com, Studded@dal.net Cc: freebsd-bugs@FreeBSD.ORG, freebsd-gnats-submit@FreeBSD.ORG Subject: Re: bin/6047: bash does not handle -e option properly Date: Wed, 18 Mar 1998 20:24:24 +1100 > 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