This is also an incomplete suggestion and I'm looking forward about the replies from others. Esp. given the recent daemon/sysread thread where some framework for forking/daemon-use would be also have been useful for the larger picture (avoiding zombies and race conditions by not reinventing an (*) overly complex and fragile process management...).

Ignoring threads and the module for now:

A true zombie is fairly lightweight and consists of not much more than kernel data containing the process exist status, which still needs to be returned to the invoking process or init. Check the man pages of perlvar (%SIG,SIGCHLD) and perlipc for details. You have zombies when you

Myself, I'd probably try the scrap from perldoc -f waitpid and add it to the parent process in a regularly visited code path.

Or better yet, grep docs and source of the fork manager module for interesting methods using wait/waitpid to avoid yet another run-in with races -> (*).

HTH & looking forward to more module-specific replies,
Peter


In reply to Re: Parallel Fork Manager -- Can't kill zombies! by jakobi
in thread Parallel Fork Manager -- Can't kill zombies! by expresspotato

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.