in reply to Re: Parallel::ForkManager leaves a zombie process from last child
in thread Parallel::ForkManager leaves a zombie process from last child
You find 1 yet-to-be reaped process wasteful, but you're ok with having N blocked processes??? I don't think you know what you want!!!
That said, this is a better solution. You fork *before* a connection comes in, so there's less lag in handling a response. And since you reuse the child process, you don't waste time forking repeatedly. One might wonder why P::FM is used at all, but it causes children that die for whatever reason to be restarted, so you always have a full pool of children waiting!