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

Re: BUG?: TRAPEXIT is not executed on interruption when TRAPINT is not defined



On Sun, Oct 18, 2026 at 5:27 PM Henry Tung <compgamer89@xxxxxxxxx> wrote:
>
> But the following script shows that TRAPEXIT is run on graceful exit,
> but does not run on interrupt until TRAPINT is also defined:

I can confirm this.  I haven't dug in to details, but I think what's
happening is that the interrupt flag is not being cleared before the
exit trap is called, so the trap function itself behaves as if it
received the signal.




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