From ffdaf134c96c9aa0cd800a3b1b34375ccb4cc978 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Tue, 11 Aug 2020 15:47:57 +0200 Subject: [PATCH] Ensure the daemon doesn't get killed by logrotate refs #8050 --- lib/cli/daemoncommand.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/cli/daemoncommand.cpp b/lib/cli/daemoncommand.cpp index 28fce401d..d6f5c610a 100644 --- a/lib/cli/daemoncommand.cpp +++ b/lib/cli/daemoncommand.cpp @@ -367,6 +367,9 @@ static void UmbrellaSignalHandler(int num, siginfo_t *info, void*) static void WorkerSignalHandler(int num, siginfo_t *info, void*) { switch (num) { + case SIGUSR1: + // Not ready, yet + break; case SIGUSR2: if (info->si_pid == l_UmbrellaPid) { // The umbrella process allowed us to continue working beyond config validation @@ -459,6 +462,7 @@ static pid_t StartUnixWorker(const std::vector& configs, bool close sa.sa_sigaction = &WorkerSignalHandler; sa.sa_flags = SA_RESTART | SA_SIGINFO; + (void)sigaction(SIGUSR1, &sa, nullptr); (void)sigaction(SIGUSR2, &sa, nullptr); (void)sigaction(SIGINT, &sa, nullptr); (void)sigaction(SIGTERM, &sa, nullptr);