std::set<pid_t> executers;
void StartTimer();
-int StartScriptExecuter(char * procName, int msgKey, int * msgID, SETTINGS_IMPL * settings);
+int StartScriptExecuter(char * procName, int msgKey, int * msgID);
int ForkAndWait(const std::string & confDir);
void KillExecuters();
}
//-----------------------------------------------------------------------------
#if defined(LINUX) || defined(DARWIN)
-int StartScriptExecuter(char * procName, int msgKey, int * msgID, SETTINGS_IMPL * settings)
+int StartScriptExecuter(char * procName, int msgKey, int * msgID)
#else
-int StartScriptExecuter(char *, int msgKey, int * msgID, SETTINGS_IMPL * settings)
+int StartScriptExecuter(char *, int msgKey, int * msgID)
#endif
{
STG_LOGGER & WriteServLog = GetStgLogger();
return -1;
case 0:
- delete settings;
#if defined(LINUX) || defined(DARWIN)
Executer(*msgID, pid, procName);
#else
for (size_t i = 0; i < settings.GetExecutersNum(); i++)
{
- int ret = StartScriptExecuter(argv[0], settings.GetExecMsgKey(), &msgID, &settings);
+ int ret = StartScriptExecuter(argv[0], settings.GetExecMsgKey(), &msgID);
if (ret < 0)
{
STG_LOGGER & WriteServLog = GetStgLogger();
WriteServLog("+++++++++++++++++++++++++++++++++++++++++++++");
+manager.stop();
+
if (loop.Stop())
WriteServLog("Event loop not stopped.");