Prose\FromHost::getProcessIsRunning PHP Method

getProcessIsRunning() public method

public getProcessIsRunning ( string $processName ) : boolean
$processName string
return boolean
    public function getProcessIsRunning($processName)
    {
        // what are we doing?
        $log = usingLog()->startAction("is process '{$processName}' running on host '{$this->args[0]}'?");
        // make sure we have valid host details
        $hostDetails = $this->getHostDetails();
        // get an object to talk to this host
        $host = OsLib::getHostAdapter($this->st, $hostDetails->osName);
        // get the information
        $return = $host->getProcessIsRunning($hostDetails, $processName);
        // did it work?
        if ($return) {
            $log->endAction("'{$processName}' is running");
            return true;
        }
        $log->endAction("'{$processName}' is not running");
        return false;
    }