Perl SIGHUP handling and config reloading
Sending the HUP signal to a Perl Listener process now results in the
following:
* Reload the opensrf_core config
* re-init the logger
* kill idle child processes
* child processes that are active when the signal is received are
tracked and killed once they become idle.
* New children are spawned per the min child settings
The primary use case for these changes is temporarily changing the log
level (or log file) for a given service for debug purposes. It may also
be used, for example, to gracefully recover excess RAM consumed by a
child process.
Not all values in opensrf_core.xml are affected by a SIGHUP. Since the
goal is a gracful reload, no attempt is made by the listener process to
re-connect to jabber or re-register with the opensrf router(s). Child
processes will by necessity connect to Jabber during startup, though, so
any changes to the jabber configuration will affect child processes. In
general, it's best to affect jabber configuration changes with a true
service restart.
opensrf.xml (opensrf.settings config) is not reloaded, so min/max child
settings will not be affected.
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>