Proc::Supervised::Convenience - Supervise concurrent worker processes
version 1.01
driver script:
#!/usr/bin/perl use Proc::Supervised::Convenience; Proc::Supervised::Convenience ->new_with_options( program => \&work ) ->supervise; sub work { my @args = @_; # code to run forever }
invocation:
./work -d -j 10 foo bar
auto-restarts worker processes
kill -HUP to restart all workers
kill -INT to stop
kill -USR1 to relaunch
--detach | -d # detach from terminal
--processes | -j N # run N copies of &work
Any remaining command line arguments are passed on as is to your work subroutine.
POE::Component::Supervisor.
Copyright 2011 Rhesa Rozendaal, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Proc::Supervised::Convenience, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Proc::Supervised::Convenience
CPAN shell
perl -MCPAN -e shell install Proc::Supervised::Convenience
For more information on module installation, please visit the detailed CPAN module installation guide.