public function startCrashedProcess()
    {
        $oldPid = pcntl_waitpid(-1, $status, WNOHANG);
    
        if ($oldPid === -1 || !isset($this->processes[$oldPid])) {
            return;
        }
    
        $oldProcess = $this->processes[$oldPid];
        unset($this->processes[$oldPid]);
    
        $pid = pcntl_fork();
        $this->startFork($pid, $this->onCrash, $oldProcess->getTask(), $oldProcess);
    }