Comos\Qpm\Process\Process::getParent PHP Метод

getParent() публичный Метод

public getParent ( ) : Process
Результат Process returns null on failure It cannot be realtime in some cases. e.g. $child = Process::current()->folkByCallable($fun); echo $child->getParent()->getPid(); If child process changed the parent, you would get the old parent ID.
    public function getParent()
    {
        if ($this->_parentProcessId) {
            return self::process($this->_parentProcessId);
        }
        if ($this->isCurrent()) {
            $ppid = \posix_getppid();
            if (!$ppid) {
                return null;
            }
            return self::process($ppid);
        }
        return null;
    }