Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: errexit and (Z)ERR trap regression



On Wed, Jun 26, 2024 at 7:01 PM Philippe Altherr
<philippe.altherr@xxxxxxxxx> wrote:
>
> It's true that in the first iteration of the while loop, the noerrexit = oldnoerrexit is always a nop. However, that isn't the case for subsequent iterations and in particular for the last iteration where it's important to always restore noerrexit to its original value (i.e., oldnoerrexit) even if that value isn't equal to 0.
>
> Now that I see this code under this angle, I think that a better version is one where noerrexit = oldnoerrexit is placed after the switch statement.

Ok, this makes much more sense to me than the previous patch.  Thanks
for digging in.




Messages sorted by: Reverse Date, Date, Thread, Author