Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Mar 1998 01:30:03 -0800 (PST)
From:      Bruce Evans <bde@zeta.org.au>
To:        freebsd-bugs
Subject:   Re: bin/6047: bash does not handle -e option properly
Message-ID:  <199803180930.BAA04312@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/6047; it has been noted by GNATS.

From: Bruce Evans <bde@zeta.org.au>
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199803180930.BAA04312>