spencer@eecs.umich.edu (Spencer W. Thomas) (05/16/91)
I've spent most of my time programming on BSD systems, but I find myself
in the position of writing a handler for SIGCHLD/SIGCLD that must be as
portable as possible. What is the best way to do this? The possibility
that occurs to me is
sig_cld_h()
{
(void)signal( SIGCLD, sig_cld_h );
(void)wait( (void *)0 );
}
Clearly, this is not the best, but it should work. I guess there is
a race condition that could lose a signal if another child exits after the
signal is delivered but before the handler is invoked. Is there anything
better one can do without wait3()?
Please respond by mail. Thank you.
--
=Spencer W. Thomas EECS Dept, U of Michigan, Ann Arbor, MI 48109
spencer@eecs.umich.edu 313-936-2616 (8-6 E[SD]T M-F)
spencer@eecs.umich.edu (Spencer W. Thomas) (05/17/91)
See comp.unix.quesntions for the answer to this question, posted by Jonathan Kamens (jik@pit-manager.mit.edu). -- =Spencer W. Thomas EECS Dept, U of Michigan, Ann Arbor, MI 48109 spencer@eecs.umich.edu 313-936-2616 (8-6 E[SD]T M-F)