X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/9c2dc9baa5ec0c9df9177b16949c7f5396a8f668..154bc708621a9073b7b434fb0591f5795542f843:/projects/stargazer/main.cpp?ds=sidebyside diff --git a/projects/stargazer/main.cpp b/projects/stargazer/main.cpp index c2134f49..200fd2a6 100644 --- a/projects/stargazer/main.cpp +++ b/projects/stargazer/main.cpp @@ -106,7 +106,7 @@ else } } //----------------------------------------------------------------------------- -#ifdef LINUX +#if defined(LINUX) || defined(DARWIN) int StartScriptExecuter(char * procName, int msgKey, int * msgID, SETTINGS_IMPL * settings) #else int StartScriptExecuter(char *, int msgKey, int * msgID, SETTINGS_IMPL * settings) @@ -151,7 +151,7 @@ switch (executerPid) case 0: delete settings; -#ifdef LINUX +#if defined(LINUX) || defined(DARWIN) Executer(*msgID, executerPid, procName); #else Executer(*msgID, executerPid); @@ -160,7 +160,7 @@ switch (executerPid) default: if (executersPid.empty()) { -#ifdef LINUX +#if defined(LINUX) || defined(DARWIN) Executer(*msgID, executerPid, NULL); #else Executer(*msgID, executerPid); @@ -267,20 +267,11 @@ if (settings->ReadSettings()) if (settings->GetLogFileName() != "") WriteServLog.SetLogFileName(settings->GetLogFileName()); - + WriteServLog("ReadSettings error. %s", settings->GetStrError().c_str()); exit(1); } - /*************************************************************************************************/ - printfd(__FILE__, "--- Script params dump ---\n"); - std::vector::const_iterator it(settings->GetScriptParams().begin()); - while (it != settings->GetScriptParams().end()) - { - printfd(__FILE__, "%s\n", it->c_str()); - ++it; - } - printfd(__FILE__, "--- End dump ---\n"); - /*************************************************************************************************/ + #ifndef NO_DAEMON std::string startFile(settings->GetConfDir() + START_FILE); #endif @@ -473,7 +464,7 @@ while (true) } break; default: - WriteServLog("Ignore signel %d", sig); + WriteServLog("Ignore signal %d", sig); break; } if (stop)