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

Re: localtraps



Vincent Stemen wrote:
> I had hoped that I could get around the problem for now by explicitly
> resetting the signal trap without using localtraps but, as you
> indicated, it will not let me do anything with the same signal while
> it is in the signal handler function.  This is a real problem that I
> don't know how to get around.

The problem may be related to the fact that the shell executes traps
from within the signal handler.  Other shells presumably wait for the
handler to exit and execute the trap at the next obvious point (e.g. a
command executed).

However, I've tried this in some recent versions of zsh (4.2.0 and
4.3.0-dev-1, which is a moving target) and it seems to do what I think
you want... abort the programme when you hit ^C twice quickly, otherwise
continue.  So I'm not sure what you're doing wrong.

-- 
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