pfind(9freebsd)

pfind9freebsd

Locate a process by number

Usage

#include <sys/param.h>

#include <sys/proc.h>

struct proc *

pfind(pid_t pid);

struct proc *

zpfind(pid_t pid);

Overview

pfind() takes a pid as its argument and returns a pointer to the proc structure whose PID is specified in the argument only if the pid is on the allproc list.

zpfind() takes a pid as its argument. If zpfind() finds a process whose PID is equal to that of argument and is a zombie process, meaning that it must reside on the zombproc list, zpfind() returns a pointer to that proc structure.

Both pfind() and zpfind() lock the proc structure that is returned using PROC_LOCK(p).

Return values

pfind() and zpfind() return a pointer to a proc structure on success and a NULL on failure.

Releases

9 releases since Debian 5.0 (Lenny); the text changed 6 times.

  1. 5.0
  2. 6.0
  3. 7
  4. 8
  5. 9
  6. 10
  7. 11–13

Authors

This manual page was written by Evan Sarmiento ⟨[email protected]⟩.

From freebsd-manpages 12.2-2 in Debian 13 (Trixie). Parsed by carta from the page's mdoc source.