[Top][All Lists]

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

Re: Segmentation fault bash 4.3.022

From: Chet Ramey
Subject: Re: Segmentation fault bash 4.3.022
Date: Mon, 11 Aug 2014 17:01:04 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

On 8/11/14, 3:05 PM, Geir Hauge wrote:

> And lastly, in interactive mode
> $ set +m; shopt -s lastpipe; trap -- "printf x" ERR; true | { true | false;
> }
> xxx
> Can't quite understand why it would trigger the ERR trap thrice.

That's easy enough to explain.  The ERR trap is triggered wherever the -e
option, if it were set, would cause the shell to exit.  There are three
places where a command fails: the `false', the group command (pipeline) on
the RHS of the outer pipeline, and the outer pipeline itself.  Any of
these faiures would cause the shell to exit, but you don't have -e set.

``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]