public function restartProcess(Process $oldProcess)
    {
        unset($this->processes[$oldProcess->getPid()]);
        posix_kill($oldProcess->getPid(), SIGUSR1);
    
        $pid = pcntl_fork();
        $this->startFork($pid, $this->onRestart, $oldProcess->getTask(), $oldProcess);
    }