]> git.stg.codes - stg.git/commitdiff
Un-ignore SIGHUP by default.
authorMaxim Mamontov <faust.madf@gmail.com>
Wed, 16 Mar 2016 20:24:07 +0000 (22:24 +0200)
committerMaxim Mamontov <faust.madf@gmail.com>
Wed, 16 Mar 2016 20:24:07 +0000 (22:24 +0200)
projects/stargazer/main.cpp

index 3c216977b8725adc961712688157125481e3f0f1..de0476879c3ca11945c650bdb1512f5bc3867f83 100644 (file)
@@ -266,6 +266,11 @@ for (size_t i = 0; i < settings.GetExecutersNum(); i++)
 
 PIDFile pidFile(settings.GetPIDFileName());
 
 
 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);
 sigset_t signalSet;
 sigfillset(&signalSet);
 pthread_sigmask(SIG_BLOCK, &signalSet, NULL);