浏览代码

Updated TFBReaper loop

Now pauses to keep from spiking CPU
msmith-techempower 8 年之前
父节点
当前提交
57bfbcfe53
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      toolset/setup/linux/TFBReaper.c

+ 6 - 1
toolset/setup/linux/TFBReaper.c

@@ -48,7 +48,12 @@ int main(int argc, char *argv[])
   // We need to wait forever; the suite will clean this 
   // process up later.
   if (ret == 0) {
-    for(;;) { }
+    for(;;) { 
+      // Pause to keep us from spiking CPU; whenever a signal
+      // occurs (except SIGTERM etc which will kill this process)
+      // just iterate and pause again.
+      pause(); 
+    }
   }
 
   // If the scripts failed, we should return that code.