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

Re: PATCH: (2) Re: FreeBSD compatability feature request



Vincent Stemen wrote:
> I also don't have a full understanding of all aspects of signal
> handling, but it looks to me like in order to implement trapsasync
> mode, it would involve using the WNOHANG option to waitpid() or
> wait3() or wait4() to periodically check the child status without
> blocking the parent until the child exits.  That way I am guessing you
> can immediately receive signals in the parent and kill the child,
> exit, or whatever.  My question is, does that affect the child's
> ability to be interactive.

Some parts of the shell do use this, but in the main part where the
shell waits for a job (zwaitjob() in jobs.c) it simple calls
sigsuspend(), installing a particular signal mask.  What's more, there's
already a loop, so it's reasonably safe about bogus signals.  It looks
likes it's probably not too hard to alter, except that signals are tricky
things.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, 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.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



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