Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #11404

Re: -e does not take effects in subshell

From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: -e does not take effects in subshell
Date 2015-08-20 19:56 -0400
Organization ITS, Case Western Reserve University
Message-ID <mailman.26.1440115119.31004.bug-bash@gnu.org> (permalink)
References (4 earlier) <55D39A71.2030109@tlinx.org> <87mvxo5mme.fsf@igel.home> <55D3B22E.9040507@tlinx.org> <20150819124214.GL4309@eeg.ccf.org> <55D4FBEA.10602@tlinx.org>

Show all headers | View raw


On 8/19/15 5:58 PM, Linda Walsh wrote:
> 
> 
> Greg Wooledge wrote:
>>
>> (Wow, how did we get here from "-e does not take effects in subshell"?)
>>
> ---
> because the POSIX spec changed and bash's handling of "-e"
> changed to follow the new spec.

This is true, though I would have used `revised' instead of `new'.

> The earlier spec had -e only exit a script if a *simple* (external)
> command failed.  It didn't include builtins nor functions.

This is not; builtins and functions are simple commands.

The Posix spec changed because it didn't accurately reflect historical
behavior.  There was a *lot* of discussion about how to accurately
describe the desired behavior, but everyone agreed that restricting it
to simple commands was not how the `base implementations' behaved.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: -e does not take effects in subshell Chet Ramey <chet.ramey@case.edu> - 2015-08-20 19:56 -0400

csiph-web