Validate if the process is running.

@return bool
771657
public function isRunning()
    {
        $running = $this->isProcessRunning();

        if (!$running && $this->getProcess()->isStarted()) {
            $this->registerEnd();
            $this->registerSuccessful();
        }

        return $running;
    }
464867
public function isSuccessful()
    {
        if ($this->getState() === static::STATE_NOT_RUNNING) {
            foreach ($this->items as $run) {
                if (!$run->isSuccessful()) {
                    return false;
                }
            }
            return true;
        }
        return false;
    }
298347
def is_running(self):
        
        try:
            kill(int(self.pid.get()), 0)
            return True
        
        # Process not running, remove PID/lock file if it exists
        except:
            self.pid.remove()
            self.lock.remove()
            return False
999058
public function valid()
    {
        // initialize/refresh cursor
        if ($this->cursor != 0 && !isset($this->elements[$this->index])) {
            $this->scan();
        }

        return isset($this->elements[$this->index]);
    }
1000963
public function isAlive()
    {
        if ($this->pid < 1) {
            return false;
        }

        $status = null;
        $pid = pcntl_wait($status, WNOHANG);

        switch ($pid) {
            case -1:
                throw new \RuntimeException('pcntl_wait failed.');

            case $this->pid:
                $this->pid = -1;

                return false;

            case 0:
                return true;
        }

        // Other pid exited.
        return true;
    }
416718
public function isAlive()
    {
        if ( $this->attribute( 'status' ) != self::STATUS_WORKING )
            throw new Exception( 'The process\'s status isn\'t \'working\'' );

        // sending 0 only checks if the process is alive (and if the current process is allowed to send signals to it)
        $return = ( posix_kill( $this->attribute( 'pid' ), 0 ) === true );
        return $return;
    }
1034599
public function isRunning()
    {
        if (self::STATUS_STARTED !== $this->status) {
            return false;
        }

        $this->updateStatus(false);

        return $this->processInformation['running'];
    }
580459
public function valid()
    {
        if ($this->container['transcoderWatermark'] === null) {
            return false;
        }
        if ($this->container['serverVersion'] === null) {
            return false;
        }
        if ($this->container['gpuAcceleration'] === null) {
            return false;
        }
        if ($this->container['wseName'] === null) {
            return false;
        }
        if ($this->container['transcoderLicensed'] === null) {
            return false;
        }
        if ($this->container['javaMaxHeapSize'] === null) {
            return false;
        }
        if ($this->container['transcoderLicensesInUse'] === null) {
            return false;
        }
        if ($this->container['javaVersion'] === null) {
            return false;
        }
        if ($this->container['httpOriginAvailable'] === null) {
            return false;
        }
        if ($this->container['serverName'] === null) {
            return false;
        }
        if ($this->container['osArchitecture'] === null) {
            return false;
        }
        if ($this->container['drmApplications'] === null) {
            return false;
        }
        if ($this->container['javaVMVersion'] === null) {
            return false;
        }
        if ($this->container['transcoderLicenses'] === null) {
            return false;
        }
        if ($this->container['timeRunning'] === null) {
            return false;
        }
        if ($this->container['licenseType'] === null) {
            return false;
        }
        if ($this->container['osBitness'] === null) {
            return false;
        }
        if ($this->container['dvrApplications'] === null) {
            return false;
        }
        if ($this->container['osVersion'] === null) {
            return false;
        }
        if ($this->container['serverBuild'] === null) {
            return false;
        }
        if ($this->container['javaName'] === null) {
            return false;
        }
        if ($this->container['maxConnections'] === null) {
            return false;
        }
        if ($this->container['dvrLicensed'] === null) {
            return false;
        }
        if ($this->container['serverMode'] === null) {
            return false;
        }
        if ($this->container['javaBitness'] === null) {
            return false;
        }
        if ($this->container['currentConnections'] === null) {
            return false;
        }
        if ($this->container['drmLicensed'] === null) {
            return false;
        }
        if ($this->container['javaVendor'] === null) {
            return false;
        }
        if ($this->container['osName'] === null) {
            return false;
        }
        if ($this->container['version'] === null) {
            return false;
        }
        if ($this->container['transcoderApplications'] === null) {
            return false;
        }
        if ($this->container['transcoderAvailable'] === null) {
            return false;
        }
        if ($this->container['javaHome'] === null) {
            return false;
        }
        if ($this->container['maxIncommingStreams'] === null) {
            return false;
        }
        if ($this->container['totalMemory'] === null) {
            return false;
        }
        if ($this->container['availableMemory'] === null) {
            return false;
        }
        if ($this->container['nativeBase'] === null) {
            return false;
        }
        if ($this->container['dvrInUse'] === null) {
            return false;
        }
        if ($this->container['drmInUse'] === null) {
            return false;
        }
        if ($this->container['licenseExpireDate'] === null) {
            return false;
        }
        if ($this->container['processorCores'] === null) {
            return false;
        }
        if ($this->container['restAPIAvailable'] === null) {
            return false;
        }
        return true;
    }
959458
public function valid() {
    if (isset($this->resources[$this->position])) {
      return true;
    }
    $this->preloadPage();
    return isset($this->resources[$this->position]);
  }
297150
public function valid()
    {
        if ($this->flags & SplFileObject::READ_AHEAD) {
            return $this->current() !== false;
        }

        return !feof($this->stream);
    }
1272985
public function isProcessRunning(bool $throwsException = false): bool
    {
        $running = false;
        try {
            $pid = $this->getPid();
            $isRunning = $this->process->isRunning($pid);
            if ($isRunning) {
                $this->logger->debug("Pid '${pid}' running.");
                $running = true;
            } else {
                $this->logger->debug("Pid '${pid}' not running.");
            }
        } catch (Exception\PidNotFoundException $e) {
            if ($throwsException) {
                throw $e;
            }
        }

        return $running;
    }
169104
public function isRunning()
    {
        $this->checkDirExists();

        $pidFile = $this->directory.$this->filename;
        if (!file_exists($pidFile)) {
            return false;
        }

        $pid = file_get_contents($pidFile);
        // Empty pid file means the process is not running
        if (empty($pid)) {
            return false;
        }

        if (!is_dir('/proc/'))
        {
            /* OSX Workaround, not as good as using proc dir on linux, but oh well */
            exec('ps -Ac -o pid | awk \'{print $1}\' | grep \'^'.$pid.'$\'', $output, $return);

            if ($return == 0) {
                // process with the same id is still running
                return true;
            }
        }

        /* we assume the system is a linux system here */
        if (!is_dir('/proc/'.$pid)) {
            // process with the same id is still running
            return false;
        }

        return true;
    }
695958
public function isValid() {
		
		$params = $this -> getParameters();
		$file 	= $this -> getFile();

		if(false === isset($params[0])) {
			return trigger_error(sprintf('Missing argument 1 for %s', __METHOD__), E_USER_ERROR);
		}

		if(false === ('-' . intval($params[0]) == '-' . $params[0])) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type integer, "%s" given', __METHOD__, gettype($params[0])), E_USER_ERROR);
		}

		$size = @filesize($file['tmp_name']);

		if(true === is_int($size)) {

			if($size >= $params[0]) {
				return true;
			}
		}

		return false;
	}
982319
public function validate()
    {
        if (is_numeric($this->categoryId) && $this->categoryId >= 1
                && is_numeric($this->forumId) && $this->forumId >= 1
                && is_numeric($this->threadId) && $this->threadId >= 1
                && !empty($this->threadSlug)) {
            return true;
        }
        return false;
    }
1046407
public function isSuccess() : bool
    {
        Assert::keyExists($this->status, "Code");

        return $this->status['Code'] === Constants::STATUS_SUCCESS;
    }
514708
public function valid()
    {
        $isValid = $this->isFlagSet(self::STATUS_VALID);
        $subscriptionFlags = self::STATUS_SUBSCRIBED | self::STATUS_PSUBSCRIBED;
        $hasSubscriptions = ($this->statusFlags & $subscriptionFlags) > 0;

        return $isValid && $hasSubscriptions;
    }
1254250
public function valid(): bool
    {
        if ($this->cacheEntriesIterator === null) {
            $this->rewind();
        }
        return $this->cacheEntriesIterator->valid();
    }