This package to run PET in FCGI mode, using FCGI::ProcManager.
This runs pet as a preforked external daemon, and listen to a socket on which it expects FastCGI communication. If a child dies, a new process is forked. Sending SIGTERM to the parent process causes an exit. There is some minimal work in that case to allow some time for the children to finish what they are doing.
When started looks for the following config parameters in run/procmanager
| setgid | groupid to change to after forking |
| setgid | userid to change to after forking |
| port | port to bind to (“socket” overrides this) |
| socket | unix socket path to bind to (stronger than “port”) |
| maxrequests | terminating child after this number of requests (please use this, it helps to kill memory leaks) |
| processes | number of preforked children |
Keeps its main pid in “$BASEPATH/run.pid”. (TODO : make this a parameter!)
Please note that the current implementation of FCGI::ProcManager is somewhat broken : the getppid call in the code of FCGI::ProcManager terminates the base process when the parent process dies. Some hackery is done here to avoid that.