Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Parallel::ForkManager leaves a zombie process from last child

by runrig (Abbot)
on May 30, 2013 at 20:39 UTC ( #1036136=note: print w/ replies, xml ) Need Help??


in reply to Parallel::ForkManager leaves a zombie process from last child

Already asked and answered on StackOverflow. You just have not accepted the answer. Bad form to cross post and not mention it.

Summary: Parallel::ForkManager reaps its processes when the number of processes has reached the max and you try to start a new one. Since you are in an infinite loop, there is always the 'last' process that remains unreaped until a new one starts (all of them remain unreaped until you start process max+1). If your loop would finish, you can call wait_all_children() and that last process will be reaped when it finishes. That is how P::FM works. If you want different behaviour, use something else.

Also, why is this a problem? You seem to be under the misapprehension that having one zombie process temporarily hanging around is bad. If your process let many such processes accumulate, that might become a problem. But that does not seem to be the case...so, what is the problem?


Comment on Re: Parallel::ForkManager leaves a zombie process from last child

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1036136]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2015-07-05 17:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (67 votes), past polls