P_CANSEE(9)
πΈ NAME πΈ
okay so bestie, this is p_cansee β straight from the Kernel Developer's Manual, section P_CANSEE(9) β and it's literally the function that determines visibility of a process. Like, can this thread even see that process? πβ¨ We're getting into it.
π SYNOPSIS π
#include <sys/proc.h>
int
p_cansee(struct thread *td, struct proc *p);
π¦ DESCRIPTION π¦
So p_cansee() determines if a given process p is visible to the thread td. And the whole notion of βvisibilityβ here? Read it as βawareness of existenceβ β like, does td even know p exists? π
This function explicitly allows a thread to always see its own process, even with pending credentials changes (see ucred(9) for that whole situation). Otherwise, it simply defers to cr_cansee(9). No cap. π
π RETURN VALUES π
p_cansee() returns 0 if the process denoted by p is visible by thread td, or ESRCH otherwise. That's the whole vibe check, bestie. β¨
π ERRORS π
[ESRCH]β Threadtdis not part of processpand cannot see it as determined bycr_cansee(9). π
π«Ά SEE ALSO π«Ά
and that's the page, bestie π this little icon is from Debian, dated August 18, 2023 β P_CANSEE(9) foreverrrr πβ¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 2003 Joseph Koshy <jkoshy@FreeBSD.org>
- Copyright (c) 2006 Ceri Davies <ceri@FreeBSD.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms