Restarts the process.
Be warned that the process is cloned before being started.
callable $callback A PHP callback to run whenever there is some: output available on STDOUT or STDERR
Process The new process
\RuntimeException When process can't be launch or is stopped
\RuntimeException When process is already running
start()
public function restart($callback = null) {
if ($this
->isRunning()) {
throw new RuntimeException('Process is already running');
}
$process = clone $this;
$process
->start($callback);
return $process;
}