I just started using Child, so please bear with me if i'm wrong...
I'm planning to use Child on a long-running process (months) who's job it is to spawn dozens to hundreds of children per second, each of which will only be short-lived (maybe 10s). I intended to call $proc->wait every few seconds on all processed returned by Child->all_procs() which have is_complete set - so that all zombies are killed. However it turns out that these processes will show up again in the next round, because entries in @Child::PROCS is always pushed to, but never removed from.
For me, the expected behavior would be that once a child has been wait()ed for, it no longer shows up hen the all_procs list...
Do you agree, or did I misunderstand the intended use of Child?
I just started using Child, so please bear with me if i'm wrong...
I'm planning to use Child on a long-running process (months) who's job it is to spawn dozens to hundreds of children per second, each of which will only be short-lived (maybe 10s). I intended to call
$proc->wait
every few seconds on all processed returned byChild->all_procs()
which haveis_complete
set - so that all zombies are killed. However it turns out that these processes will show up again in the next round, because entries in@Child::PROCS
is always pushed to, but never removed from.For me, the expected behavior would be that once a child has been
wait()
ed for, it no longer shows up hen theall_procs
list...Do you agree, or did I misunderstand the intended use of Child?