PRELEASE(3PROC) | Process Control Library Functions | PRELEASE(3PROC) |
Prelease
, Pfree
—
#include <libproc.h>
void
Prelease
(struct ps_prochandle
*P, int flags);
void
Pfree
(struct ps_prochandle
*P);
Prelease
() function is used to release all of the
resources associated with a libproc
handle. It is
suitable for handles to core files, created processes, and grabbed processes
from the Pgrab_core(3PROC),
Pcreate(3PROC),
Pgrab(3PROC), and
Pgrab_file(3PROC) functions.
After calling the Prelease
() function, all
data that was returned via the handle will no longer be valid. For example,
the data from calls to
Pctlfd(3PROC),
Pgetauxvec(3PROC),
Pstatus(3PROC), and others.
The behavior of the released process is controlled by the flags argument. By default, if no flags are passed, then the process represented by P will be set running if it was created by Pcreate(3PROC) or if it was not originally stopped or set to stop in /proc. The following values may be passed in to the flags argument. Multiple flags should be be combined with a bitwise-inclusive-OR.
PRELEASE_CLEAR
PRELEASE_RETAIN
PRELEASE_HANG
PRELEASE_KILL
SIGKILL
.
This option takes precedence over all other values that may be passed in
to flags.The Pfree
() function is similar to the
Prelease
() function in that it frees the resources
associated with the process handle P; however, unlike
the Prelease
() function, it does not handle any
logic to change or set the grabbed processes state. In general, prefer
Prelease
() to Pfree
().
May 11, 2016 | OmniOS |