If I set the timeout to 60, no other processes will run until that 60 seconds has elapsed as the wait_all_children still isn't satisfied.

Only in the rare instances when it hangs, and only because it takes that long for my method to detect that a process has become hung. That's as good as it gets without inside knowledge of the tests being run. If you know more about the tests being run (especially if you have the power to change them), then a much more responsive solution can be created.


wait_for_available_procs (which was newer than my version of Parallel::ForkManager--so I upgraded) didn't seem to make any difference.

wait_for_available_procs(3) won't make a difference.

wait_for_available_procs(1) will make a difference, but it introduces a bug and merely postpones the problem.


You introduced some major bugs in the code. Check your process list when it runs.

1. Call finish after system

2. You're killing the wrong process. You're not killing the child that's running the test. You're going to end up with lots of hung processes running. Already showed how to send the signal to the right process, and I already showed a much much simpler solution.


In reply to Re^2: Parallel::ForkManager and wait_all_children by ikegami
in thread Parallel::ForkManager and wait_all_children by rgren925

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.