Skip to content

Commit 378785b

Browse files
committed
Simplified logic for #3645
1 parent 9f7cbd9 commit 378785b

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/Runner.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -713,20 +713,17 @@ private function processChildProcs($childProcs)
713713
$numProcessed = 0;
714714
$totalBatches = count($childProcs);
715715

716-
$success = true;
717-
$childProcessFailed = false;
716+
$success = true;
718717

719718
while (count($childProcs) > 0) {
720719
$pid = pcntl_waitpid(0, $status);
721-
722720
if ($pid <= 0) {
723721
continue;
724722
}
725723

726724
$childProcessStatus = pcntl_wexitstatus($status);
727-
728725
if ($childProcessStatus !== 0) {
729-
$childProcessFailed = true;
726+
$success = false;
730727
}
731728

732729
$out = $childProcs[$pid];
@@ -776,7 +773,7 @@ private function processChildProcs($childProcs)
776773
$this->printProgress($file, $totalBatches, $numProcessed);
777774
}//end while
778775

779-
return $success && !$childProcessFailed;
776+
return $success;
780777

781778
}//end processChildProcs()
782779

0 commit comments

Comments
 (0)