Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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?
NodeReaper . o O ( Did I forget to leave the gas on? )

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (1)
As of 2016-12-04 11:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (64 votes). Check out past polls.