zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: Re: using trap function to cleanup and exit?
Date: Wed, 20 Apr 2022 09:16:24 +0100 (BST)	[thread overview]
Message-ID: <30700722.878977.1650442584271@mail2.virginmedia.com> (raw)
In-Reply-To: <CAH+w=7YhfezZ92Sg3sSsUzJgcWB4SXLbA_sFOhhG8h-bndOtag@mail.gmail.com>


> On 19 April 2022 at 22:22 Bart Schaefer <schaefer@brasslantern.com> wrote:


> On Tue, Apr 19, 2022 at 11:57 AM Peter Stephenson
> <p.w.stephenson@ntlworld.com> 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?

Correct, it was purely for clarity to keep the logic in terms of states.

pws


      reply	other threads:[~2022-04-20  8:16 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-10 15:46 Greg Klanderman
2022-04-10 15:57 ` Peter Stephenson
2022-04-10 16:12   ` Greg Klanderman
2022-04-10 16:30     ` Greg Klanderman
2022-04-10 18:15       ` Lawrence Velázquez
2022-04-14  5:13         ` Greg Klanderman
2022-04-10 20:49       ` Bart Schaefer
2022-04-10 20:55         ` Bart Schaefer
2022-04-14  5:57         ` Greg Klanderman
2022-04-14 21:29           ` Bart Schaefer
2022-04-14 23:35             ` Bart Schaefer
2022-04-17 17:08               ` Daniel Shahaf
2022-04-15 22:27             ` Bart Schaefer
2022-04-19 18:42               ` Peter Stephenson
2022-04-19 18:55                 ` Peter Stephenson
2022-04-19 21:22                   ` Bart Schaefer
2022-04-20  8:16                     ` Peter Stephenson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=30700722.878977.1650442584271@mail2.virginmedia.com \
    --to=p.w.stephenson@ntlworld.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).