Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

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, what is the problem?

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

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (11)
As of 2016-10-24 16:28 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (309 votes). Check out past polls.