From ed36c26598892c60c6d2c9a096f536cc1f4705cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Sun, 6 May 2018 12:11:51 +0200 Subject: Also handle SIGHUP to reload the configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Because that’s what is typically done on other deamons, and we don’t want to suprise users. --- src/main.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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(); -- cgit v1.2.3