Get agent pid

@return integer|false
15746
public function getRunningPID() {
        if (!file_exists($this->pidFile)) {
            return false;
        }

        $runPid = trim(file_get_contents($this->pidFile));
        if (!$runPid) {
            return false;
        }

        return $runPid;
    }
1182145
private int getPid() {

	PageContext pc = ThreadLocalPageContext.get();
	if (pc == null) {
	    pc = CFMLEngineFactory.getInstance().getThreadPageContext();
	    if (pc == null) throw new RuntimeException("cannot get pid for current thread");
	}
	return pc.getId();
    }
1040664
public static function getPidFromFile($pidFile, $check = false)
    {
        if ($pidFile && file_exists($pidFile)) {
            $pid = (int)file_get_contents($pidFile);

            // check
            if ($check && self::isRunning($pid)) {
                return $pid;
            }

            unlink($pidFile);
        }

        return 0;
    }
208641
public function getPidByWorkerId($id)
    {
        $thePid = 0;

        foreach ($this->workers as $pid => $item) {
            if ($id === $item['id']) {
                $thePid = $pid;
                break;
            }
        }

        return $thePid;
    }
527549
def get_pid(options):
    """"""
    namespace = options['settings'] if options['settings'] else options['wsgi']
    return os.path.join('{}', '{}_{}.pid').format(PID_DIR, options['http_port'], namespace.replace('.', '_'))
1243486
public long getPID() {
		long currentPID = cachedPID.get();
		if (currentPID != 0) {
			return currentPID;
		}
		try {
			currentPID = detectPID();
		} catch (Throwable cause) {
			logger.info("Unable to detect process ID!", cause);
		}
		if (currentPID == 0) {
			currentPID = System.nanoTime();
			if (!cachedPID.compareAndSet(0, currentPID)) {
				currentPID = cachedPID.get();
			}
		} else {
			cachedPID.set(currentPID);
		}
		return currentPID;
	}
700250
public function workerPids()
	{
		$pids = array();
		exec('ps -A -o pid,command | grep [r]esque', $cmdOutput);
		foreach($cmdOutput as $line) {
			list($pids[],) = explode(' ', trim($line), 2);
		}
		return $pids;
	}
351693
public function getPID()
    {
        $id = (string) $this->objectID;

        // PID is stored as little-endian, flip it around
        $pid = substr($id, 16, 2) . substr($id, 14, 2);
        return hexdec($pid);
    }
1260526
protected function get_info( $pid ) {
		$post = $this->prepare_post_info($pid);
		if ( !isset($post->post_status) ) {
			return null;
		}

		do_action_ref_array('the_post', array(&$post, &$GLOBALS['wp_query']));

		$post->status = $post->post_status;
		$post->id = $post->ID;
		$post->slug = $post->post_name;
		$customs = $this->get_post_custom($post->ID);
		if ( $this->is_previewing() ) {
			global $wp_query;
			$rev_id = $this->get_post_preview_id($wp_query);
			$customs = $this->get_post_custom($rev_id);
		}
		$post->custom = $customs;
		$post = (object) array_merge((array) $customs, (array) $post);
		return $post;
	}
985696
public function getDsn()
    {
        if ($this->checkParam()) {
            $sDsn = 'odbc:Driver={' . $this->getDriver() . '};';
            if (!empty($this->getUser())) {
                $sDsn .= 'Uid=' . $this->getUser() . ';';
            } else {
                $sDsn .= 'Uid=Admin;';
            }
            $sDsn .= 'Pwd=' . $this->getPassword() . ';Dbq=' . $this->getDatabase() . ';';
            if (!empty($this->getSystemDatabase())) {
                $sDsn .= 'SystemDB=' . $this->getSystemDatabase() . ';';
            }
            return $sDsn;
        } else {
            return false;
        }
    }
643711
function agent() {
		$headers=$this->hive['HEADERS'];
		return isset($headers['X-Operamini-Phone-UA'])?
			$headers['X-Operamini-Phone-UA']:
			(isset($headers['X-Skyfire-Phone'])?
				$headers['X-Skyfire-Phone']:
				(isset($headers['User-Agent'])?
					$headers['User-Agent']:''));
	}
165698
public function getUserAgent()
    {
        return (!empty($this->userAgent)) ? $this->userAgent : self::NAME . '/' . self::VERSION;
    }
612665
protected function getPageId($pid)
    {
        $pid = (int)$pid;
        if ($pid > 0) {
            return $pid;
        }
        $row = BackendUtilityCore::getRecord('tt_content', abs($pid), 'uid,pid');
        return $row['pid'];
    }
88947
public function getPid():?int
    {
        if(isset($this->swooleProcess->pid)){
            return $this->swooleProcess->pid;
        }else{
            return null;
        }
    }
575891
def get_pid(self):
        
        if self.dwProcessId is None:
            if self.__process is not None:
                # Infinite loop if self.__process is None
                self.dwProcessId = self.get_process().get_pid()
            else:
                try:
                    # I wish this had been implemented before Vista...
                    # XXX TODO find the real ntdll call under this api
                    hThread = self.get_handle(
                                        win32.THREAD_QUERY_LIMITED_INFORMATION)
                    self.dwProcessId = win32.GetProcessIdOfThread(hThread)
                except AttributeError:
                    # This method really sucks :P
                    self.dwProcessId = self.__get_pid_by_scanning()
        return self.dwProcessId
970153
function get_parent(){
		if( !is_null($this->pidx) && isset(self::$reg[$this->pidx]) ){
			return self::$reg[$this->pidx];
		}
		else {
			return null;
		}
	}
1108280
public function getStatus() {
        if ($this->pid) {
            $waitPID = \pcntl_waitpid($this->pid, $status, WNOHANG);

            if ($waitPID == $this->pid) {
                return Thread::THREAD_EXITED;
            } else {
                return Thread::THREAD_RUNNING;
            }
        }
    }