Sub::Daemon - base class for a deamons
Fork with dances
Return: pid of child process - for parent 0 - for a child process
Daemonize of process. Forks, closes STDIN/STDOUT/STDERR....
Write pid-file
Checking, may by this daemon runned early
Remove pid-file
Init log.
Start child worker proccess. Control of work
Params:
nproc - Number of childs process. Be default: 1 code - CODE REF of child process
To install Sub::Daemon, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Sub::Daemon
CPAN shell
perl -MCPAN -e shell install Sub::Daemon
For more information on module installation, please visit the detailed CPAN module installation guide.