public function Process::restart in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/process/Process.php \Symfony\Component\Process\Process::restart()
Restarts the process.
Be warned that the process is cloned before being started.
Parameters
callable|null $callback A PHP callback to run whenever there is some: output available on STDOUT or STDERR
Return value
Process The new process
Throws
RuntimeException When process can't be launched
RuntimeException When process is already running
See also
start()
File
- vendor/
symfony/ process/ Process.php, line 313
Class
- Process
- Process is a thin wrapper around proc_* functions to easily start independent PHP processes.
Namespace
Symfony\Component\ProcessCode
public function restart($callback = null) {
if ($this
->isRunning()) {
throw new RuntimeException('Process is already running');
}
$process = clone $this;
$process
->start($callback);
return $process;
}