From: Maxim Mamontov Date: Thu, 14 Apr 2016 17:37:49 +0000 (+0300) Subject: Merge remote-tracking branch 'origin/ticket26' into stg-2.409 X-Git-Tag: 2.409~174^2~1 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/c0fff5a4f4e765e5bb9f01a5d380cbdc098d04e6?hp=-c Merge remote-tracking branch 'origin/ticket26' into stg-2.409 --- c0fff5a4f4e765e5bb9f01a5d380cbdc098d04e6 diff --combined projects/stargazer/main.cpp index de047687,93aaefd5..26bd9727 --- a/projects/stargazer/main.cpp +++ b/projects/stargazer/main.cpp @@@ -266,11 -266,6 +266,11 @@@ for (size_t i = 0; i < settings.GetExec 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); @@@ -343,8 -338,15 +343,15 @@@ while (running switch (sig) { case SIGHUP: + { + SETTINGS_IMPL newSettings(settings); + if (newSettings.ReadSettings()) + WriteServLog("ReadSettings error. %s", newSettings.GetStrError().c_str()); + else + settings = newSettings; traffCnt.Reload(); - manager.reload(); + manager.reload(settings); + } break; case SIGTERM: running = false;