]> git.stg.codes - stg.git/blobdiff - projects/rscriptd/main.cpp
Block all signals in threads other than main
[stg.git] / projects / rscriptd / main.cpp
index 344a26113b3287b744225d685b9f10a9cb11b2a5..2739758ce400cb9f49cd62d1287736888fdf8614 100644 (file)
@@ -251,12 +251,12 @@ switch (executerPid)
         //close(1);
         //close(2);
         //setsid();
-        Executer(msgKey, *msgID, executerPid, procName);
+        Executer(*msgID, executerPid, procName);
         return 1;
 
     default:    // Parent
         if (executersPid.empty())
-            Executer(msgKey, *msgID, executerPid, NULL);
+            Executer(*msgID, executerPid, NULL);
         executersPid.insert(executerPid);
     }
 return 0;
@@ -430,7 +430,8 @@ WriteServLog("+++++++++++++++++++++++++++++++++++++++++++++");
 
 while (nonstop.GetStatus())
     {
-    usleep(100000);
+    struct timespec ts = {0, 100000000};
+    nanosleep(&ts, NULL);
     }
 
 listener->Stop();