From f12f8cc038c4421884a6787e110a517bbaea1953 Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Mon, 19 Sep 2011 10:53:02 +0300 Subject: [PATCH] Block all signals earlie, to inherit by all nested threads --- projects/stargazer/main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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); -- 2.44.2