PASFD(3PROC) Process Control Library Functions PASFD(3PROC)
Pasfd - obtain the process address space file descriptor
Process Control Library (libproc, -lproc)
#include <libproc.h>
int
Pasfd(struct ps_prochandle *P);
The Pasfd() function returns a file descriptor that allows direct
access to the address space of the process handle P. A defined file
descriptor is provided when using the Pcreate(3PROC), Pgrab(3PROC),
Pgrab_file(3PROC), and Pgrab_core(3PROC) functions. Note that the
address space may be different in each of these cases and doesn't
necessarily correspond to the /proc as file, except for live processes.
Other means of obtaining a libproc process handle may not define a file
descriptor that contains the address space.
The returned file descriptor must not be closed and is only valid for
as long as the corresponding process handle P is valid. After a call
to Prelease(3PROC) the file descriptor is invalidated.
Upon successful completion, the Pasfd() function returns a valid file
descriptor. Otherwise, if none exists, then -1 is returned.
Uncommitted
MT-LEVEL
See LOCKING in libproc(3LIB).
libproc(3LIB), Pcreate(3PROC), Pgrab(3PROC), Pgrab_core(3PROC),
Pgrab_file(3PROC), Prelease(3PROC), proc(5)
illumos August 22, 2023 illumos
NAME
Pasfd - obtain the process address space file descriptor
LIBRARY
Process Control Library (libproc, -lproc)
SYNOPSIS
#include <libproc.h>
int
Pasfd(struct ps_prochandle *P);
DESCRIPTION
The Pasfd() function returns a file descriptor that allows direct
access to the address space of the process handle P. A defined file
descriptor is provided when using the Pcreate(3PROC), Pgrab(3PROC),
Pgrab_file(3PROC), and Pgrab_core(3PROC) functions. Note that the
address space may be different in each of these cases and doesn't
necessarily correspond to the /proc as file, except for live processes.
Other means of obtaining a libproc process handle may not define a file
descriptor that contains the address space.
The returned file descriptor must not be closed and is only valid for
as long as the corresponding process handle P is valid. After a call
to Prelease(3PROC) the file descriptor is invalidated.
RETURN VALUES
Upon successful completion, the Pasfd() function returns a valid file
descriptor. Otherwise, if none exists, then -1 is returned.
INTERFACE STABILITY
Uncommitted
MT-LEVEL
See LOCKING in libproc(3LIB).
SEE ALSO
libproc(3LIB), Pcreate(3PROC), Pgrab(3PROC), Pgrab_core(3PROC),
Pgrab_file(3PROC), Prelease(3PROC), proc(5)
illumos August 22, 2023 illumos