From f6b42411f8193b918e00d06551ed85985913ffa1 Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Wed, 16 Mar 2016 22:24:07 +0200 Subject: [PATCH] Un-ignore SIGHUP by default. --- projects/stargazer/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/stargazer/main.cpp b/projects/stargazer/main.cpp index 3c216977..de047687 100644 --- a/projects/stargazer/main.cpp +++ b/projects/stargazer/main.cpp @@ -266,6 +266,11 @@ for (size_t i = 0; i < settings.GetExecutersNum(); i++) PIDFile pidFile(settings.GetPIDFileName()); +struct sigaction sa; +memset(&sa, 0, sizeof(sa)); +sa.sa_handler = SIG_DFL; +sigaction(SIGHUP, &sa, NULL); // Apparently FreeBSD ignores SIGHUP by default when launched from rc.d at bot time. + sigset_t signalSet; sigfillset(&signalSet); pthread_sigmask(SIG_BLOCK, &signalSet, NULL); -- 2.44.2