Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: BUG: Exit trap is not executed when error occurs in a function
- X-seq: zsh-workers 55254
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Philippe Altherr <philippe.altherr@xxxxxxxxx>
- Cc: Eric Postpischil <eric@xxxxxxx>, zsh-workers@xxxxxxx
- Subject: Re: BUG: Exit trap is not executed when error occurs in a function
- Date: Tue, 10 Nov 2026 18:07:17 -0800
- 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=ntdXKmv52BngAy10uCKhOsxFndX5nQ0y92b5Ux72p/I=; fh=x1SLVdTeYD1MwpJYc2D/DV2O+ZYLtTZQqBMq6Tp3qK4=; b=JXGoBs90g+WvYcoQLTVvwh49mnmPxf7X9rtRnIWdWbxOtbj861VqJ6bixjKEPpvrtg NwSDNmjWYWFtSWSGsQA+yvSA2V996i3+AFztbU/6zqn+rqUoRGvH2DssenTdV7pdkWyf xpM7YaxX3bVLjwGXTN5nVB8qvbrAfaAPGvKDgLeI4AquYi5BoumxbAtK5+z6yWcR11Wj e5T7w/zFkdXbyxe9WLbhPzPUcI2g3fyeoekL5wkWbcjWcBqKNJImYSdSOCRHkmWz8JMW I8aTxyCE88l3hVgjuOow3zMhokDe1pR61M6WhYjIAUihAJNGa2Nw+vmtH8BA7tFRZsE5 wb8A==; darn=zsh.org
- Arc-seal: i=1; a=rsa-sha256; t=1794362850; cv=none; d=google.com; s=arc-20260327; b=oE2a/Ht0atMCdBU/IOPaXEqQAbGRIMEJ41LnwHVA2Ylkittq3kyQ+JqB2zSwTruif4 X/jT+eYVpbSjw7qNyTiatC45KeWh+jcpd+wvSFReYe7Bii6t381pc7nzChzKRMHg9Dp1 7iC8whJecRZBIqU/EOaJee8TIv/FUd6Bya0MXWAgziuepjqQJZIJHG2KLqGUxlbm3R+S SqE4TkWUJgaBJv6+DxN0J8mKQRdfwHIT+9guu84wvapx9uTsR3yy7eH15bWWln0ea7nT ae6NADjpE9JCT6m6jOqH72oS6aTAUmyHKCaE2DrRlItQqtqxp7kVJ4JghLEJw/37CggB Gb2Q==
- Archived-at: <https://zsh.org/workers/55254>
- In-reply-to: <CAGdYchvp8S-oPE0vBgSGdBgqLgB6e+3jMcnuWwRnc-jbbS7nPw@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <BCCC0361-23F4-42FD-84E2-2C4565804F3D@edp.org> <3F7FD0A9-4B81-4B88-9914-A44026F7A903@edp.org> <CAGdYchvp8S-oPE0vBgSGdBgqLgB6e+3jMcnuWwRnc-jbbS7nPw@mail.gmail.com>
On Tue, Nov 10, 2026 at 4:56 PM Philippe Altherr
<philippe.altherr@xxxxxxxxx> wrote:
>
> I'm not a maintainer, just an occasional contributor, but I think that your original mail was the right way to report the issue. However, for some reason, Gmail classified this email as spam and iirc it was the same for your original email. Maybe that explains the lack of response.
I think this is DMARC related, edp.org has a p=reject policy which is
tripped when zsh-workers forwards the email without changing the From:
header.
> What you report looks very much like a bug to me.
I haven't dug in myself but I think this is actually expected
behavior? Return from a function is not a shell exit? There should
be some archive messages related to the handling of ERR_EXIT vs.
ERR_RETURN.
> Strangely enough, just a few days before your original email, someone else reported a similar issue (workers/55221) where TRAPEXIT fails to execute on interruptions.
I replied to that one, it's repeatable, the "was interrupted" state
persists into the exit trap and aborts it.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author