At Tuesday 22 June 2010, Andres P wrote:
> On Tue, Jun 22, 2010 at 4:45 AM, Stefano Lattarini
>
> <[email protected]> wrote:
> >> ++ false # Subshell false
> >> +++ TRIGGERED_ERR # Ignores outer "|| true"
> >
> > No, it doesen't even see it; the script seen by the subshell
> > consists just of the string "false", so there is no `||' the
> > subshell can see. And this seems IMHO quite natural if you
> > remember that the parent shell and the subshell are run in two
> > different proceses.
>
> Thanks, makes sense.
>
> So this is a regression with bash 4? Because as I mentioned, the
> ERR trap does not trigger at any point in this example.
>
> Andres P
>
Sorry, I missed that we were using bash3 in your example! *blush*
So obviously I missed the sense of your question, too.
And in fact you're right, the ERR trap is not triggered with bash 4
(I'm using version 4.0.28(1)-release). I don't see anything in the
NEWS file about it. So I'm joining you in asking if this is a
regression.
Thanks and sorry for the noise,
Stefano