p_cansee (9)
Leading comments
Copyright (c) 2003 Joseph Koshy <jkoshy@FreeBSD.org> Copyright (c) 2006 Ceri Davies <ceri@FreeBSD.org> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of cond...
NAME
p_cansee - determine visibility of a processSYNOPSIS
In sys/param.h In sys/proc.h Ft int Fn p_cansee struct thread *td struct proc *pDESCRIPTION
This function can be used to determine if a given process Fa p is visible to the thread Fa td , where the notion of ``visibility'' may be read as ``awareness of existence''The function is implemented using cr_cansee9, and the dependencies on sysctl(8) variables documented in the cr_cansee9 manual page apply.
RETURN VALUES
The Fn p_cansee function returns 0 if the process denoted by Fa p is visible by thread Fa td , or a non-zero error return value otherwise.ERRORS
- Bq Er ESRCH
- Process Fa p is not visible to thread Fa td as determined by cr_cansee9.
- Bq Er ESRCH
- Thread Fa td has been jailed and process Fa p does not belong to the same jail as Fa td .
- Bq Er ESRCH
- The MAC subsystem denied visibility.