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

Re: using trap function to cleanup and exit?



On Tue, Apr 19, 2022 at 11:57 AM Peter Stephenson
<p.w.stephenson@xxxxxxxxxxxx> wrote:
>
> +               /*
> +                * If the trap is primed but we've hit an explicit exit,
> +                * we should skip any further handling and bail out now.
> +                */
> +               if (trap_state != TRAP_STATE_INACTIVE)
>                     trap_state = TRAP_STATE_FORCE_RETURN;

Isn't that exactly equivalent to what I had?  TRAP_STATE_INACTIVE is
zero, isn't it?

Either we want (trap_state == TRAP_STATE_PRIMED) ... or we can go with
the above, but it's cosmetic only.  I think.




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