[prev in list] [next in list] [prev in thread] [next in thread]
List: bash-bug
Subject: Re: 'set -e' and 'trap 0' togheter does not work as expected on syntax errors
From: Stefano Lattarini <stefano.lattarini () gmail ! com>
Date: 2009-08-22 9:31:31
Message-ID: 200908221131.37410.stefano.lattarini () gmail ! com
[Download RAW message or body]
At Saturday 22 August 2009, Chet Ramey <chet.ramey@case.edu> wrote:
> Stefano Lattarini wrote:
>> I have the following scripts:
>>
>> [CUT]
>>
>> I thought that when bash detect a syntax errors in the script,
>> it would pass a $? != 0 to the code in the exit trap, regardless
>> of whether `set -e' is active or not.
>
> It's not exactly a bug -- this behavior isn't standardized
> anywhere, and historical shells behave differently. The behavior
> you want is useful enough that I'll change it for bash-4.1, though.
>
> Chet
Thanks, much appreciated.
Oh, and by the way, sorry for the duplicate message.
Regards,
Stefano
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic