public function restart() : int
    {
        $pid = $this->getServerPid();
        if (empty($pid)) {
            return $this->start();
        }
        $stopped = $this->stop();
        if ($stopped !== true) {
            throw new ControlException('Error while stopping current Angela process.');
        }
        return $this->start();
    }
public function restart() : int
    {
        $pid = $this->getServerPid();
        if (empty($pid)) {
            return $this->start();
        }
        $stopped = $this->stop();
        if ($stopped !== true) {
            throw new ControlException('Error while stopping current Angela process.');
        }
        return $this->start();
    }
public function restart ( ) : int { $ pid = $ this -> getServerPid ( ) ; if ( empty ( $ pid ) ) { return $ this -> start ( ) ; } $ stopped = $ this -> stop ( ) ; if ( $ stopped !== true ) { throw new ControlException ( 'Error while stopping current Angela process.' ) ; } return $ this -> start ( ) ; }
Restarts Angela processes.

@throws ControlException
@return int Pid of new server process.
Restarts Angela processes .