tail head cat sleep
QR code linking to this page

Manual Pages  — PFIND

NAME

pfind – locate a process by number

CONTENTS

SYNOPSIS

#include <sys/param.h>
#include <sys/proc.h>

struct proc *
pfind(pid_t pid);

struct proc *
zpfind(pid_t pid);

DESCRIPTION

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.

SEE ALSO

pgfind(9)

AUTHORS

This manual page was written by Evan Sarmiento <Mt kaworu@sektor7.ath.cx>.

PFIND (9) July 11, 2001

tail head cat sleep
QR code linking to this page


Please direct any comments about this manual page service to Ben Bullock. Privacy policy.

The most horrifying thing about Unix is that, no matter how many times you hit yourself over the head with it, you never quite manage to lose consciousness. It just goes on and on.
— Patrick Sobalvarro