bug-bash
[Top][All Lists]
Advanced

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

Re: bash 3.2.51, ERR traps and subshells


From: Stefano Lattarini
Subject: Re: bash 3.2.51, ERR traps and subshells
Date: Tue, 22 Jun 2010 18:18:37 +0200
User-agent: KMail/1.12.1 (Linux/2.6.30-2-686; KDE/4.3.4; i686; ; )

At Tuesday 22 June 2010, Andres P wrote:
> On Tue, Jun 22, 2010 at 4:45 AM, Stefano Lattarini
> 
> <stefano.lattarini@gmail.com> 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



reply via email to

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