[Top][All Lists]

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

Re: Revisiting Error handling (errexit)

From: Koichi Murase
Subject: Re: Revisiting Error handling (errexit)
Date: Wed, 6 Jul 2022 19:20:53 +0900

2022年7月6日(水) 19:05 Yair Lenga <yair.lenga@gmail.com>:
> Function foo will run with errfail logic. But bash will revert back to no
> errfail when control revert back to bar, and zap will run WITHOUT errfail.
> I remember reading about other bash setting that are automatically restored
> on function exits. Can not remember which one.

That should be `local -' of Bash 4.4+. E.g.,

function foo { local -; set -e; ...; }


reply via email to

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