X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/49696df16652f10a0cc7a7391a270bf12dc26c06..4b6cb30ae7c85d6ca9d2defb4e6d8f5cae309eeb:/stglibs/scriptexecuter.lib/scriptexecuter.c diff --git a/stglibs/scriptexecuter.lib/scriptexecuter.c b/stglibs/scriptexecuter.lib/scriptexecuter.c index bf45105a..bdf60230 100644 --- a/stglibs/scriptexecuter.lib/scriptexecuter.c +++ b/stglibs/scriptexecuter.lib/scriptexecuter.c @@ -40,13 +40,12 @@ if (msgsnd(msgid, (void *)&sd, MAX_SCRIPT_LEN, 0) < 0) return 0; } //----------------------------------------------------------------------------- -#ifdef LINUX +#if defined(LINUX) || defined(DARWIN) void Executer(int msgID, pid_t pid, char * procName) #else void Executer(int msgID, pid_t pid) #endif { -int ret; struct SCRIPT_DATA sd; struct sigaction newsa, oldsa; sigset_t sigmask; @@ -56,7 +55,7 @@ if (pid) return; nonstop = 1; -#ifdef LINUX +#if defined(LINUX) || defined(DARWIN) memset(procName, 0, strlen(procName)); strcpy(procName, "stg-exec"); #else @@ -94,7 +93,7 @@ sigaction(SIGUSR1, &newsa, &oldsa); while (nonstop) { sd.mtype = 1; - ret = msgrcv(msgid, &sd, MAX_SCRIPT_LEN, 0, 0); + int ret = msgrcv(msgid, &sd, MAX_SCRIPT_LEN, 0, 0); if (ret < 0) {