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

Re: Is wait not interruptable?



Bart Schaefer wrote:
> Note that the important thing through this whole section is that
> last_signal is sane, so that we don't end up waiting for the wrong
> child if both a SIGCHLD and some other signal arrive during the
> signal_suspend().  (I may be missing a detail that makes that comment
> irrelevant.)

I don't think there should be a problem with signal ordering.  It's not
affected by the changes to traps --- none of the code I touched affects
last_signal, except, obviously, the fact that we may now handle some
signals earlier; but we had to be prepared to handle signals at that
point anyway.

> } One slight difference is that in zwaitjob() we'll delay traps to wait
> } for the entire foreground job, not just the first process to exit.
> 
> Is that affected by TRAPS_ASYNC?

Yes, if TRAPS_ASYNC is set (or we're at the wait builtin) we'd have
handled the trap already.  The difference is only if we'd otherwise have
been delaying signal delivery.

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


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php



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