Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

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]
[ovedpo15]: how to check with regex that string has ",0" (notice the comma) but it 0 is the last char. for example: "hey,0" = good, "a,0" = good, "a,01" = bad, "hey,010101" = bad
[ovedpo15]: also "hey,010" is bad. only ",0 *end of string*"
[choroba]: /,0$/

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2018-03-20 07:43 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (248 votes). Check out past polls.