void Executer(int msgID, pid_t pid)
#endif
{
+int ret;
+struct SCRIPT_DATA sd;
+struct sigaction newsa, oldsa;
+sigset_t sigmask;
+
msgid = msgID;
if (pid)
return;
setproctitle("stg-exec");
#endif
-struct sigaction newsa, oldsa;
-sigset_t sigmask;
-
sigemptyset(&sigmask);
sigaddset(&sigmask, SIGTERM);
newsa.sa_handler = SIG_IGN;
newsa.sa_flags = 0;
sigaction(SIGUSR1, &newsa, &oldsa);
-int ret;
-
-struct SCRIPT_DATA sd;
-
while (nonstop)
{
sd.mtype = 1;
usleep(20000);
continue;
}
- int ret = system(sd.script);
+ ret = system(sd.script);
if (ret == -1)
{
// Fork failed