--- solenv/bin/build.pl	2007-07-16 16:25:40.000000000 +0200
+++ solenv/bin/build.pl	2007-07-16 16:38:43.000000000 +0200
@@ -1397,13 +1397,15 @@ sub handle_dead_children {
                     };
                 };
             }
+            sleep 1 if (children_number() >= $QuantityToBuild);
         } else {
             if (($pid = waitpid( -1, &WNOHANG)) > 0) {
                 store_error($pid, $?) if ($?);
                 clear_from_child($pid);
+            } else {
+                select(undef, undef, undef, 0.001) if (children_number() >= $QuantityToBuild);
             };
         };
-        sleep 1 if (children_number() >= $QuantityToBuild);
     } while(children_number() >= $QuantityToBuild);
 };
 
