bug-bash
[Top][All Lists]
Advanced

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

Re: Error handling question


From: Greg Wooledge
Subject: Re: Error handling question
Date: Mon, 9 Nov 2009 08:37:11 -0500
User-agent: Mutt/1.4.2.3i

On Mon, Nov 09, 2009 at 08:39:57AM +0200, Ciprian Dorin, Craciun wrote:
>     But then how can I solve the problem? (How about `()` which
> clearly is a new shell instance.)

The problem being "how to use set -e in a consistent manner across all
shells"?  You can't.  set -e is unpredictable, unreliable, and should be
shunned.  As you can see by the last dozen or so message on this mailing
list, not even bash gurus (other than Chet) can figure out its semantics.

Check for errors yourself on the commands that matter.  That way you'll
know what will cause termination and what won't.  Yes, I know, it means
your script is longer.  But longer is better than unpredictable.




reply via email to

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