diff options
Diffstat (limited to 'interimap')
-rwxr-xr-x | interimap | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -118,8 +118,9 @@ sub cleanup() { close $LOGGER_FD if defined $LOGGER_FD; $DBH->disconnect() if defined $DBH; } -$SIG{$_} = sub { msg(undef, $!); cleanup(); exit 1; } foreach qw/INT/; -$SIG{$_} = sub { cleanup(); exit 0; } foreach qw/HUP TERM/; +$SIG{INT} = sub { msg(undef, $!); cleanup(); exit 1; }; +$SIG{TERM} = sub { cleanup(); exit 0; }; +$SIG{HUP} = sub { $_->stats() foreach grep defined, ($lIMAP, $rIMAP); }; ############################################################################# |