exit on HUP to free up memory.

This commit is contained in:
Isaac Connor 2018-08-02 06:52:36 -04:00
parent 5b878d5e89
commit 3de6b764e2
1 changed files with 5 additions and 0 deletions

View File

@ -98,6 +98,11 @@ use constant EVENT_PATH => ($Config{ZM_DIR_EVENTS}=~m|/|)
logInit($filter_id?(id=>'zmfilter_'.$filter_id):()); logInit($filter_id?(id=>'zmfilter_'.$filter_id):());
sub HupHandler { sub HupHandler {
# This idea at this time is to just exit, freeing up the memory.
# zmfilter.pl will be respawned by zmdc.
TermHandler();
return;
Info('Received HUP, reloading'); Info('Received HUP, reloading');
ZoneMinder::Object::init_cache(); ZoneMinder::Object::init_cache();
&ZoneMinder::Logger::logHupHandler(); &ZoneMinder::Logger::logHupHandler();