PFIND(9)
π PFIND(9) β Kernel Developer's Manual π
okay bestie, welcome to PFIND(9) β¨ this is the kernel dev manual page for two little functions that go find a process for you, and honestly? they ate. let's get into it π«Ά
πΈ NAME πΈ
pfind, zpfind β locate a process by number π
β¨ SYNOPSIS β¨
like, here's the whole vibe, copy-paste it exactly bestie:
#include <sys/param.h>
#include <sys/proc.h>
struct proc *
pfind(pid_t pid);
struct proc *
zpfind(pid_t pid);
π DESCRIPTION π
okay so. pfind() takes a pid as its argument and returns a pointer to the proc structure whose PID is specified in the argument β but ONLY if that pid is on the allproc list. no allproc, no pointer, that's the rule π
and then zpfind() also takes a pid as its argument. if zpfind() finds a process whose PID is equal to that of the argument and it's a zombie process β meaning it must reside on the zombproc list π§ β then zpfind() returns a pointer to that proc structure. it's giving "found the undead one" πβ¨
bothpfind()andzpfind()lock theprocstructure that is returned, usingPROC_LOCK(p). π no cap, that lock is real, respect it.
π RETURN VALUES π
pfind() and zpfind() return a pointer to a proc structure on success π and a NULL on failure π that's it, that's the whole deal.
π¦ SEE ALSO π¦
π AUTHORS π
this manual page was written by Evan Sarmiento <kaworu@sektor7.ath.cx> π iconic behavior honestly.
and that's a wrap, bestie π this was the Debian flavored version, dated July 11, 2001, filed under PFIND(9) β mwah, go find some processes, you got this π π
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 2001 Evan Sarmiento
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms