public function restart($callback = null) { if ($this->isRunning()) { throw new \RuntimeException('Process is already running'); } $process = clone $this; $process->start($callback); return $process; }