in reply to Keeping track of children from previous runs of a script

It seems to me that Parallel::ForkManager has a method of each of your requirements. For example, it can wait for all children and it can kill them. The fork has to be done by the pm->start method instead of the direct fork command. To generalise your usage where you repeatedly want to do the same thing for a fork management method, you could create a wrapper class that has your standard pre and post-method-call requirements in the wrapper method before and/or after the call to the pfm method.

One world, one people

  • Comment on Re: Keeping track of children from previous runs of a script