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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |