P_CANSEE(9)
π P_CANSEE(9) π
okay so bestie, welcome to the P_CANSEE page from the Kernel Developer's Manual β yes it's a section 9 one, that's the kernel-dev girlies section, iykyk π§
β¨ NAME β¨
p_cansee β figure out if a process is even visible π
πΈ SYNOPSIS πΈ
#include <sys/param.h>
#include <sys/proc.h>
int
p_cansee(struct thread *td, struct proc *p);
π¦ DESCRIPTION π¦
so like, this function is your lil vibe check β¨ β you use it to determine whether a given process p is visible to the thread td. and when we say "visibility" here, read it as "awareness of existence" β like, does td even know p is out here living its best life? π
The way it's implemented? It's riding on cr_cansee(9), no cap. Which means the dependencies on sysctl(8) variables that are documented over in the cr_cansee(9) manual page apply here too, fr fr. Go read that one, bestie, it's the lore π«Ά
π RETURN VALUES π
p_cansee() returns 0 if the process denoted by p is visible by thread td β slay π β or a non-zero error return value otherwise. that's the whole mood.
π ERRORS π
[ESRCH]β Processpis not visible to threadtd, as determined bycr_cansee(9). it's giving invisible. π[ESRCH]β Threadtdhas been jailed, and processpdoes not belong to the same jail astd. different jail, different world, no crossover π«[ESRCH]β The MAC subsystem denied visibility. the MAC subsystem said no and honestly? it ate. π
π₯ SEE ALSO π₯
jail(2), sysctl(8), cr_cansee(9), mac(9), p_candebug(9), prison_check(9)
and that's the page, bestie!! this lil baddie came to you from Debian, dated November 19, 2006 β vintage icon behavior honestly, 2006 was out here being a main character before any of us. periodt π β¨ππ¦πΈπ«Ά
π¦ 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) 2003 Joseph Koshy <jkoshy@FreeBSD.org>
- Copyright (c) 2006 Ceri Davies <ceri@FreeBSD.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms