This module is a refactoring of FCGI::ProcManager, it behaves exactly the same, but the API is a little
different. The function-oriented API has been removed in favor of object-oriented API. The "pm_" prefix
has been removed from the hook routines and instead they now use the "augment" and "inner" functionality
from Moose. More docs will come eventually.
SignalHandling
FCGI::Engine::ProcManager attempts to do the right thing for proper shutdowns.
When it receives a SIGHUP, it sends a SIGTERM to each of its children, and then resumes its normal
operations.
When it receives a SIGTERM, it sends a SIGTERM to each of its children, sets an alarm(3) "die timeout"
handler, and waits for each of its children to die. If all children die before this timeout, process
manager exits with return status 0. If all children do not die by the time the "die timeout" occurs, the
process manager sends a SIGKILL to each of the remaining children, and exists with return status 1.
FCGI::Engine::ProcManager uses POSIX::sigaction() to override the default SA_RESTART policy used for
perl's %SIG behavior. Specifically, the process manager never uses SA_RESTART, while the child FastCGI
servers turn off SA_RESTART around the accept loop, but re-enstate it otherwise.
The desired (and implemented) effect is to give a request as big a chance as possible to succeed and to
delay their exits until after their request, while allowing the FastCGI servers waiting for new requests
to die right away.