Browse Source

Updated TFBReaper loop

Now pauses to keep from spiking CPU
msmith-techempower 8 years ago
parent
commit
57bfbcfe53
1 changed files with 6 additions and 1 deletions
  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 
   // We need to wait forever; the suite will clean this 
   // process up later.
   // process up later.
   if (ret == 0) {
   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.
   // If the scripts failed, we should return that code.