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

Re: Allowing traps

On Nov 20,  4:09pm, Peter Stephenson wrote:
} I have some shell code using the new trap behaviour which gets upset
} if instances of it are not called sequentially. Should we add an
} extra flag to block traps explicitly from running when we are inside
} doqueuedtraps()?

We don't need a flag ... the behavior should be that for all xxx, SIGxxx is
blocked when running the trap for that signal.  The OS will enforce that if
the trap is run directly from the signal handler, so we should emulate it
when running the traps in deferred fashion.

This could still cause signals to be received in a different order than
they would otherwise have been, which is one reason I would have preferred
to have reentrancy or limited critical sections rather than deferrals.

Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   

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