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

Re: Possible signal handling issues



On Thu, 02 Jan 2014 23:52:42 -0800
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> 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.

Hmm... My experience suggests (but doesn't conclusively show) that the
signal doesn't get delivered *during* the trap handler (since if you
prolong its life artificially the signal is ignored), but may
sometimes be delivered *afterwards*, and that the latter is what's
causing the funny effects.  As there's no way of ensuring a signal gets
delivered to where it's going promptly, since they're by their nature
asynchronous, it therefore didn't struck me as particularly significant
that in that case you could trigger the trap to run again.  I can't
think of anything I'd want to do to make it better, is another way of
putting it.

pws



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