|The stupid question is the question not asked|
Keeping children alive persistiently, intelligentlyby Hercynium (Hermit)
|on Feb 08, 2008 at 19:30 UTC||Need Help??|
Hercynium has asked for the
wisdom of the Perl Monks concerning the following question:
Magnanimous Monks, myriad musings mottle my moody mind. Maybe many mighty mentors might minister me memorable motions mending my malady? (I've been waiting to post that for months - alliteration is dorky but *fun!*) :)
OK, here's what I came for:
I have a program that forks off a pile of long-running children. Actually, the child processes should probably *never* return or die, in normal operation.
The code I've already written (simplified version below in the readmore section) simply reports info about dead children to a log, but now I need to do more...
The calls to fork are done inside a loop that looks like this:
Generally, this works very well, but there are some things I need to add and I'm somewhat uncertain about how I would best go about it.
SO... I need advice with the following requirements:
My main question is this:
Is the code above a bad way for me to do this?
Should I continue writing my own solution(s) or is there a robust CPAN module that will do this for me with less hassle?