Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Mar 1998 08:20:03 -0800 (PST)
From:      Ahmon Dancy <dancy@franz.com>
To:        freebsd-bugs
Subject:   Re: bin/6047: bash does not handle -e option properly 
Message-ID:  <199803181620.IAA04652@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: Ahmon Dancy <dancy@franz.com>
To: Studded <Studded@dal.net>
Cc: Bruce Evans <bde@zeta.org.au>, 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 08:14:27 -0800

 Hi guys.
 
 
 >> 	No, sh exits for the exit status of funcfalse being '1'. Return is a
 >> builtin whose only job is to terminate and report the exit status of the
 >> function. 
 
 Exactly.. And the man page for 'sh' reports that if this return value
 is tested (such as within an 'if' statement like in my example), then
 the shell should not exit.
 
 
 >> 	The commented section demonstrates what I think the point of contention
 >> is. The shell is handling functions differently than it is handling
 >> "commands." My initial response was based on my belief that this was the
 >> desired behaviour. You however are in a much better position to deal
 >> with the POSIX definitions of those terms than I am, so I bow to your
 >> expertise. If a "function" is not a "command," then set -e is working as
 >> advertised, if not as we'd expect. If the terms are equivalent, there is
 >> a bug. I suspect that the terms are equivalent and that my initial
 >> response was incorrect based on the fact that bash handles the whole
 >> script and doesn't exit at the false tested function.
 >> 
 >> 	The reason I asked what the PR originator was trying to accomplish was
 >> to offer my assistance in accomplishing the actual goal (which I doubt
 >> was to test various permutations of shell settings :). The offer is
 >> still open. 
 
 Thanks for the offer. :)  The piece of code I submitted was just a
 chunk of code that works right on every other platform (Solaris, AIX,
 HP/UX, SunOS, Irix, Linux) except for FreeBSD.  As the name implies
 (in a LISPish manner), it's testing to see whether the argument
 (expected to be a pathname) is on an automounted NFS filesystem
 (/net/hostname/x/y/x).  
 
 
 
 
 
 

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?199803181620.IAA04652>