]> git.stg.codes - stg.git/commitdiff
Merge remote-tracking branch 'origin/ticket26' into stg-2.409
authorMaxim Mamontov <faust.madf@gmail.com>
Thu, 14 Apr 2016 17:37:49 +0000 (20:37 +0300)
committerMaxim Mamontov <faust.madf@gmail.com>
Thu, 14 Apr 2016 17:37:49 +0000 (20:37 +0300)
1  2 
projects/stargazer/main.cpp

index de0476879c3ca11945c650bdb1512f5bc3867f83,93aaefd5fe9f070bc05788409cc9e137c5546cea..26bd9727e808be08e77920cf4efc361c80795110
@@@ -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;