Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/Symfony/Component/Process/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -436,12 +436,10 @@ public function wait(callable $callback = null)
* from the output in real-time while writing the standard input to the process.
* It allows to have feedback from the independent process during execution.
*
* @param callable $callback
*
* @throws RuntimeException When process timed out
* @throws LogicException When process is not yet started
*/
public function waitUntil(callable $callback)
public function waitUntil(callable $callback): bool
{
$this->requireProcessIsStarted(__FUNCTION__);
$this->updateStatus(false);
Expand All @@ -465,7 +463,14 @@ public function waitUntil(callable $callback)
$this->fallbackStatus['exitcode'] = (int) $data;
}
}
if ($wait && !$this->isRunning()) {
return false;
}

usleep(1000);
} while ($wait);

return true;
}

/**
Expand Down