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
- X-seq: zsh-workers 55224
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Henry Tung <compgamer89@xxxxxxxxx>
- Cc: zsh-workers@xxxxxxx
- Subject: Re: BUG?: TRAPEXIT is not executed on interruption when TRAPINT is not defined
- Date: Wed, 21 Oct 2026 08:20:10 -0700
- Arc-authentication-results: i=1; mx.google.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=yG3oBw4DH2ya9Enc6hnT5z5+0sQWmwLqNBgvCeTHjnM=; fh=1pTHAX++1qF0oYfa8h7/ldjJzVZerKe0RrxiL83cDcA=; b=bC4lA3psjloztIpq3skqmbcCd02YgXvs+/77hmzvPXRGvX9IbbUkqXn6iJdgweaf3Q WrC2AewP+Nwn/BXL8RxZaeO/68xjTilXOdVcq2GqtJ0P7fLkvVkFhPbdCB8cFgxPNVLs 97LmlATXGkE5GlYLdkKopbPpXTTFG/FzRkVDLTVLlF8WEByaWG2toe0GGSard7X8vAzW Teqz7LqN87KvEevtdt2OsL9znOVU/1Mxu/ynclHMQHkIWk1NC3tGjiALTCSP1ecLLtEX 7XGQ1ZCKcuxXtZtwSzJqC0RYM2aXub/unQuYHkj26EmpJb62i9uDimdCUC4rgoPRkHuL XJmA==; darn=zsh.org
- Arc-seal: i=1; a=rsa-sha256; t=1792596022; cv=none; d=google.com; s=arc-20260327; b=n0IR9kIxM8cayA686blmngcophnCydebuLvDiB8XIFqfQtuMo3wPhFcpuFwgOkCOvm zX/s06Q79Wdy9tOTVI7Fw6qcwQxE8Gf/M5ny8picYIxJOqvynvIDWgRTdBtrC2HbbQuT Mma1bA/7MngGSpj1Sf4Mhvyukkq5iTJ1E8O+PRSmJ0f4lNEm1Gi8ll08TUWPx/C9Jy6q gIAopvmG1dipvWj+hvwcK8C+c0KxEwdtqwgdDiB+kt+Rd92Q38AZ1HSxoWjxmBeA3U/F o2U7UibWFGK5H2IOBEfkCFkb0iC+ymjEJlWl/DJG0xrPuVvjkG03p4b4kqKopH1ynmDf D1TA==
- Archived-at: <https://zsh.org/workers/55224>
- In-reply-to: <CAKzaJtiSQadfXzBFkvXmX653kSYWzjMHrJR4ZLhh=zB36paOgw@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAKzaJtiSQadfXzBFkvXmX653kSYWzjMHrJR4ZLhh=zB36paOgw@mail.gmail.com>
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