#include "stg/plugin.h"
#include "stg/logger.h"
#include "stg/scriptexecuter.h"
-#include "stg/conffiles.h"
#include "stg/version.h"
-#include "stg/pinger.h"
#include "stg_timer.h"
#include "settings_impl.h"
#include "users_impl.h"
case 0:
delete settings;
+#ifdef LINUX
Executer(*msgID, executerPid, procName);
+#else
+ Executer(*msgID, executerPid);
+#endif
return 1;
default:
if (executersPid.empty()) {
+#ifdef LINUX
Executer(*msgID, executerPid, NULL);
+#else
+ Executer(*msgID, executerPid);
+#endif
}
executersPid.insert(executerPid);
}
#endif
{
#ifndef NO_DAEMON
-stgChildPid = fork();
+pid_t childPid = fork();
string startFile = confDir + START_FILE;
unlink(startFile.c_str());
-switch (stgChildPid)
+switch (childPid)
{
case -1:
return -1;
PIDFile pidFile(settings->GetPIDFileName());
+sigset_t signalSet;
+sigfillset(&signalSet);
+pthread_sigmask(SIG_BLOCK, &signalSet, NULL);
+
StartTimer();
WaitTimer();
if (!IsStgTimerRunning())
creat(startFile.c_str(), S_IRUSR);
#endif
-sigset_t signalSet;
-sigfillset(&signalSet);
-pthread_sigmask(SIG_BLOCK, &signalSet, NULL);
-
while (true)
{
sigfillset(&signalSet);