public function kill() : bool
    {
        // kill server process:
        $serverPid = $this->getServerPid();
        if (!empty($serverPid)) {
            $this->killProcessById($serverPid);
        }

        // kill worker processes:
        $workerPids = [];
        foreach ($this->config['pool'] as $poolName => $poolConfig) {
            $pids = $this->getPidsByPath($poolConfig['worker_file']);
            if (empty($pids)) {
                continue;
            }
            $workerPids = array_merge($workerPids, $pids);
        }
        if (empty($workerPids)) {
            return true;
        }
        foreach ($workerPids as $pid) {
            $this->killProcessById($pid);
        }
        return true;
    }
public function kill() : bool
    {
        // kill server process:
        $serverPid = $this->getServerPid();
        if (!empty($serverPid)) {
            $this->killProcessById($serverPid);
        }

        // kill worker processes:
        $workerPids = [];
        foreach ($this->config['pool'] as $poolName => $poolConfig) {
            $pids = $this->getPidsByPath($poolConfig['worker_file']);
            if (empty($pids)) {
                continue;
            }
            $workerPids = array_merge($workerPids, $pids);
        }
        if (empty($workerPids)) {
            return true;
        }
        foreach ($workerPids as $pid) {
            $this->killProcessById($pid);
        }
        return true;
    }
public function kill ( ) : bool { // kill server process: $ serverPid = $ this -> getServerPid ( ) ; if ( ! empty ( $ serverPid ) ) { $ this -> killProcessById ( $ serverPid ) ; } // kill worker processes: $ workerPids = [ ] ; foreach ( $ this -> config [ 'pool' ] as $ poolName => $ poolConfig ) { $ pids = $ this -> getPidsByPath ( $ poolConfig [ 'worker_file' ] ) ; if ( empty ( $ pids ) ) { continue ; } $ workerPids = array_merge ( $ workerPids , $ pids ) ; } if ( empty ( $ workerPids ) ) { return true ; } foreach ( $ workerPids as $ pid ) { $ this -> killProcessById ( $ pid ) ; } return true ; }
Tries to kill all Angela related processes.

@return bool
Tries to kill all Angela related processes .