[PATCH] Add non-blocking Wait() for launched processes

Edwin Vane edwin.vane at intel.com
Fri Sep 20 11:18:18 PDT 2013


  Looks ok to me. A few style nits. Don't forget to change the filemodes back to 644 or whatever is default.


================
Comment at: lib/Support/Windows/Program.inc:403-404
@@ -386,3 +402,4 @@
     // -2 indicates a crash or timeout as opposed to failure to execute.
-    return -2;
+	WaitResult->ReturnCode = -2;
+    return WaitResult;
   }
----------------
Looks like there might be a tab here. Indenting is off.

================
Comment at: lib/Support/Program.cpp:63-66
@@ +62,6 @@
+    *ExecutionFailed = false;
+  if (!Execute(PI, Program, args, envp, redirects, memoryLimit, ErrMsg)) {
+    if (ExecutionFailed)
+      *ExecutionFailed = true;
+  }
+
----------------
I'm not sure if the single-line flow control style thing applies here. There's only a single statement within the outer if...

================
Comment at: lib/Support/Unix/Program.inc:347
@@ -327,1 +346,3 @@
+  } else if (SecondsToWait == 0) {
+    WaitPidOptions = WNOHANG;
   }
----------------
Single line if.


http://llvm-reviews.chandlerc.com/D1728



More information about the llvm-commits mailing list