I can reproduce the problem. wait never returns. Looks like a bug in Perl. Fortunately, it appears to be fixed in 5.10.0.

# .5 and .33 are the only two up atm. my @hosts = map "10.0.0.$_", 3..7,31..35;
>c:\progs\perl5100\bin\perl parallel_ping.pl -3300 is processing 10.0.0.3 -3308 is processing 10.0.0.4 -1456 is processing 10.0.0.5 -2780 is processing 10.0.0.6 -3368 is processing 10.0.0.7 -3024 is processing 10.0.0.31 -2400 is processing 10.0.0.32 -2944 is processing 10.0.0.33 -400 is processing 10.0.0.34 -1108 is processing 10.0.0.35 reaping -1456 for 10.0.0.5 reaping -2944 for 10.0.0.33 reaping -3300 for 10.0.0.3 reaping -1108 for 10.0.0.35 reaping -3024 for 10.0.0.31 reaping -3368 for 10.0.0.7 reaping -3308 for 10.0.0.4 reaping -2400 for 10.0.0.32 reaping -400 for 10.0.0.34 reaping -2780 for 10.0.0.6 10.0.0.3 is bad 10.0.0.31 is bad 10.0.0.32 is bad 10.0.0.33 is good 10.0.0.34 is bad 10.0.0.35 is bad 10.0.0.4 is bad 10.0.0.5 is good 10.0.0.6 is bad 10.0.0.7 is bad

Maybe it had to do with `` using wait as well. On unix, that wouldn't be a problem since the two calls to wait happen in different processes. The pseudo-processes fork creates on Windows are just threads, so the two calls to wait happen in the same process.


In reply to Re^3: Windows fork problem or my ignorance? by ikegami
in thread Windows fork problem or my ignorance? by romandas

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.