From d059885d9bcb254c9b3673cb5ee223df8faea510 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Tue, 3 Jan 2023 18:29:31 +0100 Subject: [PATCH] Main process: ignore SIGHUP On OpenBSD rcctl reload icinga2 SIGHUPs all "icinga2" processes, not just our umbrella. We must handle this. --- lib/cli/daemoncommand.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/cli/daemoncommand.cpp b/lib/cli/daemoncommand.cpp index b92ab79a7..28ab0459d 100644 --- a/lib/cli/daemoncommand.cpp +++ b/lib/cli/daemoncommand.cpp @@ -499,6 +499,14 @@ static pid_t StartUnixWorker(const std::vector& configs, bool close sa.sa_handler = SIG_DFL; (void)sigaction(SIGUSR1, &sa, nullptr); + } + + { + struct sigaction sa; + memset(&sa, 0, sizeof(sa)); + + sa.sa_handler = SIG_IGN; + (void)sigaction(SIGHUP, &sa, nullptr); }