[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -e does not take effects in subshell

From: Chet Ramey
Subject: Re: -e does not take effects in subshell
Date: Thu, 20 Aug 2015 19:56:47 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.2.0

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    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]