X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/a65f0d5b294d9a5d90e4767ef50857c4cf3589b2..65eef741908a8005f8a1e11f1fa0f6c19afd3d0c:/projects/stargazer/main.cpp?ds=sidebyside diff --git a/projects/stargazer/main.cpp b/projects/stargazer/main.cpp index 3db3b266..3c216977 100644 --- a/projects/stargazer/main.cpp +++ b/projects/stargazer/main.cpp @@ -66,7 +66,7 @@ namespace std::set 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(); @@ -89,9 +89,9 @@ else } //----------------------------------------------------------------------------- #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(); @@ -132,7 +132,6 @@ switch (pid) return -1; case 0: - delete settings; #if defined(LINUX) || defined(DARWIN) Executer(*msgID, pid, procName); #else @@ -251,7 +250,7 @@ WriteServLog("Stg v. %s", SERVER_VERSION); 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(); @@ -364,6 +363,8 @@ while (running) WriteServLog("+++++++++++++++++++++++++++++++++++++++++++++"); +manager.stop(); + if (loop.Stop()) WriteServLog("Event loop not stopped.");