Main process: ignore SIGHUP

On OpenBSD rcctl reload icinga2 SIGHUPs all "icinga2" processes,
not just our umbrella. We must handle this.
This commit is contained in:
Alexander A. Klimov 2023-01-03 18:29:31 +01:00
parent f59f361f09
commit d059885d9b

View File

@ -499,6 +499,14 @@ static pid_t StartUnixWorker(const std::vector<std::string>& 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);
}