OpenBSD manual page server

Manual Page Search Parameters

PFIND(9) Kernel Developer's Manual PFIND(9)

pfind, pgfindfind process / process group by number

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

struct proc *
pfind(pid_t pid);

struct pgrp *
pgfind(pid_t pgid);

The () and () functions retrieve process and progress group structures from process and process group IDs.

Both functions return NULL if the requested ID can't be found.

Those functions are implemented in the file sys/kern/kern_proc.c.

May 31, 2007 OpenBSD-5.1