summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2018-05-06 12:11:51 +0200
committerlouiz’ <louiz@louiz.org>2018-05-06 12:13:09 +0200
commited36c26598892c60c6d2c9a096f536cc1f4705cc (patch)
treee14c2da07123fb64d4698dc13817fea2a9c1f82b /src
parentedcd80cca12b45bd79a631f6c421a6cfce9c17f6 (diff)
downloadbiboumi-ed36c26598892c60c6d2c9a096f536cc1f4705cc.tar.gz
biboumi-ed36c26598892c60c6d2c9a096f536cc1f4705cc.tar.bz2
biboumi-ed36c26598892c60c6d2c9a096f536cc1f4705cc.tar.xz
biboumi-ed36c26598892c60c6d2c9a096f536cc1f4705cc.zip
Also handle SIGHUP to reload the configuration
Because that’s what is typically done on other deamons, and we don’t want to suprise users.
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 59fda4e..09adc5c 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -103,6 +103,7 @@ int main(int ac, char** av)
sigaddset(&mask, SIGTERM);
sigaddset(&mask, SIGUSR1);
sigaddset(&mask, SIGUSR2);
+ sigaddset(&mask, SIGHUP);
sigprocmask(SIG_BLOCK, &mask, nullptr);
// Install the signals used to exit the process cleanly, or reload the
@@ -124,6 +125,7 @@ int main(int ac, char** av)
on_sigusr.sa_flags = 0;
sigaction(SIGUSR1, &on_sigusr, nullptr);
sigaction(SIGUSR2, &on_sigusr, nullptr);
+ sigaction(SIGHUP, &on_sigusr, nullptr);
auto p = std::make_shared<Poller>();