In both cases, the child is not (completely) dead. It only disappears after waitpid allows it to die.

I feel this phrasing is slightly misleading...

ZOMBIE is the final state of a process (It does not "run" anymore). In that state all ressources used by the process are freed, all except one, the slot corresponding to the process in the kernel process table. If the father of that process is not a daemon and finishes eventually (even without handling /SIGC(H)?LD/) then the process is orphaned and init will reclaim it . If the father is a daemon then it *must* handle /SIGC(H)?LD/ or there is potential for the system process table to fill up. After that chaos is guaranteed, as nobody can fork!

Some systems allow a process to ignore /SIGC(H)?ILD/ so that the system does the reaping for it. I think it's POSIX but not (yet) fully portable. Note Un*x does not do this reaping systematically as the information is useful especially if you just want to control a pool of processes etc...The single UNIX spec (since 98 I think -- at least my HP-UX 11.0 manpage says so) does sanctify the "ignore" shortcut.

cheers --stephan

In reply to Re^6: Pipes and IO::Select's method can_write() by sgt
in thread Pipes and IO::Select's method can_write() by almut

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.