aboutsummaryrefslogtreecommitdiffstats
path: root/interimap
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2015-09-11 01:02:57 +0200
committerGuilhem Moulin <guilhem@fripost.org>2015-09-11 01:02:57 +0200
commit77753445ddc78013159a6d44301a1b342af4a2d1 (patch)
treee2fb87745f2118a7703ba5954ceb1c81ee0c5dcf /interimap
parentb099ebf5b8d5f73168d075c5d97a6242efb67a8e (diff)
parentcd7d385b4a27d028a7c7f92e1cd781b65b8ca5eb (diff)
Merge branch 'master' into debian
Diffstat (limited to 'interimap')
-rwxr-xr-xinterimap5
1 files changed, 3 insertions, 2 deletions
diff --git a/interimap b/interimap
index c5de2ce..4a8bde4 100755
--- a/interimap
+++ b/interimap
@@ -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 TERM/;
-$SIG{$_} = sub { msg(undef, $!); cleanup(); exit 0; } foreach qw/HUP/;
+$SIG{INT} = sub { msg(undef, $!); cleanup(); exit 1; };
+$SIG{TERM} = sub { cleanup(); exit 0; };
+$SIG{HUP} = sub { $_->stats() foreach grep defined, ($lIMAP, $rIMAP); };
#############################################################################