zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: Possible signal handling issues
Date: Thu, 02 Jan 2014 23:52:42 -0800	[thread overview]
Message-ID: <140102235242.ZM10573@torch.brasslantern.com> (raw)
In-Reply-To: <20140102225336.2fa58a39@pws-pc.ntlworld.com>

On Jan 2, 10:53pm, Peter Stephenson wrote:
}
} Just to finish off this train of thought:  I'm sure Bart remembers this,
} but it's worth reminding home viewers that if TRAPINT returns status
} 0, which it usually will with then kill last, then the job controller assumes
} the signal was already handled, so doesn't take any action to pass the
} signal on to the job itself.  If I add "return 1" to the end of
} TRAPINT() I only ever see the output once before the job ends.

I wasn't specifically considering that, but I think it's irrelevant. [*]
What I was pointing out is that it shouldn't be possible for signal N
to be delivered during the trap handler for that same signal, but the
way zsh "queues" signal handlers means that the TRAPN() function is not
usually called "during" the delivery of the signal.

} I think I've now lost interest in this...

Fair enough.

[*] It does suggest that Chris Johnson's script could possibly be improved
by replacing "kill -HUP $$" with a simple "return 1".  Haven't tried it.


  reply	other threads:[~2014-01-03  7:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-28 23:02 Bart Schaefer
2014-01-02 21:55 ` Peter Stephenson
2014-01-02 22:40   ` Peter Stephenson
2014-01-02 22:53     ` Peter Stephenson
2014-01-03  7:52       ` Bart Schaefer [this message]
2014-01-03 17:44         ` Peter Stephenson

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=140102235242.ZM10573@torch.brasslantern.com \
    --to=schaefer@brasslantern.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).