P is for Practical | |
PerlMonks |
Parallel::ForkManager never reaching run_on_finish()by swafo (Initiate) |
on Jul 24, 2013 at 00:02 UTC ( [id://1045971]=perlquestion: print w/replies, xml ) | Need Help?? |
swafo has asked for the wisdom of the Perl Monks concerning the following question: I am trying to create a perl daemon that sits and runs non-stop. Here is the code I have now:
Things to note: What am I doing wrong that prevents these processes from reaching run_on_finish() ? If things are indeed running the way they should be, then what do I need to do to make this work the way I want? What I want: start 20 child processes, have each of them die in due course, and immediately have a new one start up, via the startChild() function. Each child may be dealing with a fair amount of data, which is why I want them to die, so as to free up that memory. I do not want to use a while(1) {} loop in the master section of the code as that tends to spike the CPU at times.
Any feedback would be most welcome.
Back to
Seekers of Perl Wisdom
|
|