Process::wait()

int wait(callable $callback = null)

Waits for the process to terminate.

The callback receives the type of output (out or err) and some bytes 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.

Parameters

callable $callback A valid PHP callback

Return Value

int The exitcode of the process

Exceptions

RuntimeException When process timed out
RuntimeException When process stopped after receiving signal
LogicException When process is not yet started
doc_Symfony
2016-10-28 06:27:02
Comments
Leave a Comment

Please login to continue.