On Fri, 24 Sep 2004 17:20:44 +0200, Jenda Krynicky <[EMAIL PROTECTED]> wrote:
> From: Errin Larsen <[EMAIL PROTECTED]>
> > See that "<defunct>"?!  How did my process get a <defunct> status?  Is
> > that a Solaris-fancy way of saying "zombie-child"?
> 
> I believe so.
> 
> > The above explains
> > why my (kill 0 => $pid) isn't working the way I expect, but How can I
> > kill the kid.  The <defunct> child process finally dies if I kill the
> > parent (original dummy_monitor) script.  Does this mean that my setsid
> > line in my original script is not working correctly?  I'm confused
> > here.
> 
> I believe you are supposed to wait()/waitpid() on your children. Or
> install a $SIG{SIGCHLD} handler that reaps the children.
> 
> I haven't used Perl under any Unix for years so I can't give you the
> details. perldoc perlipc should help.
> 
> 
> 
> Jenda


Yup.  I tried putting:
  $SIG{CHLD}='IGNORE';
in my parent and that prevents the zombie child.  So, next question!

how do I wait() or waitpid() on more than one process?  don't both of
those make the wait()ing process sit still and do nothing else until
it gets a return?  I'll read perlipc again (man that's a hard one to
grok) and see what it says.

--Errin

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to