![]() |
|
We don't bite newbies here... much | |
PerlMonks |
Re: Looking for a daemonizing moduleby rjt (Curate) |
on Sep 07, 2019 at 08:11 UTC ( #11105782=note: print w/replies, xml ) | Need Help?? |
Any::Daemon seems alright, and Parallel::ForkManager might also be a reasonable choice for fork-model multiprocessing apps in Perl, even though it doesn't do a few of the things on your list. From the synopsis:
I'm not sure how easy it will be to do an Apache-style graceful restart (your #3), as I haven't used P:FM in a while. As for #4, that would be trivial to implement in the child itself. $pm->finish if ++$my_requests > $conf->{max_child_requests}; It doesn't give you any kind of PID file or command line help (Daemon::Control is nice for that, but it isn't really intended for multiprocessing), which is way harder to get right than a PID file. I hope this helps. Without knowing more about your application, this advice is generic. Specific requirements might pull you in a different direction.
use strict; use warnings; omitted for brevity.
In Section
Seekers of Perl Wisdom
|
|