GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
PGET(9) FreeBSD Kernel Developer's Manual PGET(9)

pget
locate a process by number

#include <sys/param.h>
#include <sys/proc.h>

int
pget(pid_t pid, int flags, struct proc **pp);

This function takes a pid as its argument, which can be either a process or thread id, and fills a pointer to the proc structure in *pp. In the latter case, a process owning the specified thread is looked for. The operation is performed by invoking the pfind(9) function. The found process is returned locked. For the PGET_HOLD case, it is returned unlocked (but held). The pget() function can perform additional manipulations, depending on a flags argument.

The flags argument is the logical OR of some subset of:

If set, the found process will be held and unlocked.
If set, the found process will be checked for its visibility. See p_cansee(9).
If set, the found process will be checked for its debuggability. See p_candebug(9).
If set, the found process will be checked that it matches the current process context.
If set, the found process will be checked that it does not have the process flag P_WEXIT set.
If set, the found process will be checked that it does not have the process flag P_INEXEC set.
If set, pid is not assumed as a thread id for values larger than PID_MAX.
If set, the found process will be checked that the caller may get a read access to its structure. A shorthand for (PGET_HOLD | PGET_CANDEBUG | PGET_NOTWEXIT).

If the process is found in the specified way, then zero is returned, otherwise an appropriate error code is returned.

p_candebug(9), p_cansee(9), pfind(9)
May 3, 2014 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 9 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.