bug-bash
[Top][All Lists]
Advanced

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

Re: Revisiting Error handling (errexit)


From: Martin D Kealey
Subject: Re: Revisiting Error handling (errexit)
Date: Wed, 13 Jul 2022 01:32:45 +1000

Hi Yair

One other comment:

On Sun, 10 Jul 2022 at 05:39, Yair Lenga <yair.lenga@gmail.com> wrote:

> The old 'errexit' logic was spec'ed many years ago. As far as I can tell,
> it existed in bash 2.0, from 1996. I think requirements/expectations are
> different now. The 'exit on error' error handling was good for 1996 - does
> not meet today's requirement - using bash to glue complex systems together.
>

This was in the first POSIX.1 spec (in the 1980's) and in the Bourne shell
before that.

I'll let you into a secret: it wasn't a "good" solution back when it was
added to the Bourne shell; the only saving grace then was that shell
scripts were rarely longer than a page, so it didn't matter as much.

I've just run a test in Bash v1.14.7 and (not unexpectedly) "set -e" had
the same effect there.

-Martin


reply via email to

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