don't wait for subprocs when none running
authorEvan Martin <martine@danga.com>
Wed, 1 Dec 2010 00:19:02 +0000 (16:19 -0800)
committerEvan Martin <martine@danga.com>
Wed, 1 Dec 2010 00:19:02 +0000 (16:19 -0800)
build.cc

index a7d2418..83282e5 100644 (file)
--- a/build.cc
+++ b/build.cc
@@ -113,7 +113,7 @@ bool RealCommandRunner::StartCommand(Edge* edge) {
 }
 
 void RealCommandRunner::WaitForCommands() {
-  while (subprocs_.finished_.empty()) {
+  while (subprocs_.finished_.empty() && !subprocs_.running_.empty()) {
     subprocs_.DoWork();
   }
 }