From owner-freebsd-bugs Wed Mar 18 08:14:42 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA03705 for freebsd-bugs-outgoing; Wed, 18 Mar 1998 08:14:42 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from sparky.franz.com (sparky.franz.com [192.132.95.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA03686; Wed, 18 Mar 1998 08:14:29 -0800 (PST) (envelope-from dancy@franz.com) Received: from ultra.franz.com by sparky.franz.com (8.8.8/FI-2.0) id IAA26916; Wed, 18 Mar 1998 08:14:28 -0800 (PST) Received: from ultra by ultra.franz.com (SMI-8.6/FI-2.0) id IAA11046; Wed, 18 Mar 1998 08:14:27 -0800 Message-Id: <199803181614.IAA11046@ultra.franz.com> To: Studded cc: Bruce Evans , freebsd-bugs@FreeBSD.ORG, freebsd-gnats-submit@FreeBSD.ORG Subject: Re: bin/6047: bash does not handle -e option properly In-reply-to: Your message of "Wed, 18 Mar 1998 02:58:24 PST." <350FA8D0.A9CCF864@dal.net> Date: Wed, 18 Mar 1998 08:14:27 -0800 From: Ahmon Dancy Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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