bug-bash
[Top][All Lists]
Advanced

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

Re: bug with 'set -e' + 'trap 0' + syntax error


From: Marc Herbert
Subject: Re: bug with 'set -e' + 'trap 0' + syntax error
Date: Fri, 21 Aug 2009 15:06:17 +0100
User-agent: Thunderbird 2.0.0.21 (X11/20090320)

Stefano Lattarini a écrit :

> I thought that when bash detect a syntax errors in a script,
> it would pass a $? != 0 to the code in the exit trap, regardless
> of whether `set -e' is active or not.

> 
> I think this can be classified as a bug in bash (in some
> situations, a very nasty one). Please let me know if I
> have misunderstood something, or if there is a simple
> workaround.

I am not familiar with the standard(s), but... isn't having expectations in
the case of syntax errors a bit far-fetched?





reply via email to

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