From: Maxim Mamontov Date: Mon, 19 Sep 2011 07:53:02 +0000 (+0300) Subject: Block all signals earlie, to inherit by all nested threads X-Git-Tag: 2.408-rc1~29 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/f12f8cc038c4421884a6787e110a517bbaea1953?ds=sidebyside Block all signals earlie, to inherit by all nested threads --- diff --git a/projects/stargazer/main.cpp b/projects/stargazer/main.cpp index 80ec465b..3839ae8e 100644 --- a/projects/stargazer/main.cpp +++ b/projects/stargazer/main.cpp @@ -286,6 +286,10 @@ for (size_t i = 0; i < settings->GetExecutersNum(); i++) PIDFile pidFile(settings->GetPIDFileName()); +sigset_t signalSet; +sigfillset(&signalSet); +pthread_sigmask(SIG_BLOCK, &signalSet, NULL); + StartTimer(); WaitTimer(); if (!IsStgTimerRunning()) @@ -393,10 +397,6 @@ WriteServLog("+++++++++++++++++++++++++++++++++++++++++++++"); creat(startFile.c_str(), S_IRUSR); #endif -sigset_t signalSet; -sigfillset(&signalSet); -pthread_sigmask(SIG_BLOCK, &signalSet, NULL); - while (true) { sigfillset(&signalSet);