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

Re: localtraps and signal handling on NetBSD

Vincent Stemen wrote:
> I have an idea, that might not be to difficult to implement, that I
> think would solve the problem, unless you know of other problems it
> would create.
> If, inside the signal handler, I execute the trap statement on the
> same signal, turn off the intrap status because the signal is now
> re-trapped.

I don't think that's the problem.  intrap has a quite limited effect,
determining how the shell behaves when already handling signals.

The vague suspicion is that the problem is based on whether or not the
trap handler is run inside the signal handler, and whether the system
resets the signal.  It's possible to tweak the queueing code, which
would force more traps to be run after the handler exits rather than
within it, but I'm really not sure enough about what's going on to
suggest anything definite.

Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.


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