p_cansee(9freebsd)

p_cansee9freebsd

Determine visibility of a process

Usage

#include <sys/param.h>

#include <sys/proc.h>

int

p_cansee(struct thread *td, struct proc *p);

Overview

This function can be used to determine if a given process p is visible to the thread td, where the notion of “visibility” may be read as “awareness of existence”.

The function is implemented using cr_cansee(9), and the dependencies on sysctl(8) variables documented in the cr_cansee(9) manual page apply.

Return values

The p_cansee() function returns 0 if the process denoted by p is visible by thread td, or a non-zero error return value otherwise.

Errors

[ESRCH]

Process p is not visible to thread td as determined by cr_cansee(9).

[ESRCH]

Thread td has been jailed and process p does not belong to the same jail as td.

[ESRCH]

The MAC subsystem denied visibility.

Releases

9 releases since Debian 5.0 (Lenny); the text changed 6 times.

  1. 5.0
  2. 6.0
  3. 7
  4. 8
  5. 9
  6. 10
  7. 11–13

From freebsd-manpages 12.2-2 in Debian 13 (Trixie). Parsed by carta from the page's mdoc source.