|PROC_ARG_GRAB(3PROC)||Process Control Library Functions||PROC_ARG_GRAB(3PROC)|
proc_arg_xgrab — process
grabbing utility function
Process Control Library (libproc, -lproc)
proc_arg_grab(const char *arg,
int oflag, int gflag,
proc_arg_xgrab(const char *arg,
const char *path, int oflag,
int gflag, int *perr,
const char **lwps);
The string arg contains the name of something to try and open. How it is interpreted depends on the value of oflag. The following values may be passed in as a bitwise-exclusive-OR for oflag:
The argument gflag controls the behavior when the corresponding process grabbing function is called by the underlying system. For a list of flags that may be passed in here, see Pgrab(3PROC) and Pgrab_core(3PROC).
The path argument allows a search path for its binaries to be specified in case a core file is found and opened.
If the lwps argument is
NULL, then the functions will treat any portion
of arg after a ‘/’ character as a thread
range. The thread range will be validated as though a call to the
function had been made, and a pointer to the start of the range will be
stored in lwps. For a discussion of what constitutes a
valid thread range, please see
Upon successful completion, the
proc_arg_xgrab() functions return a pointer to the
process handle. Otherwise,
NULL is returned and
perr is set to include a more specific error.
proc_arg_xgrab() function will fail if:
PR_ARG_CORESwas set and no core file could be found corresponding to arg.
PR_ARG_PIDSwas set and no process could be found corresponding to arg.
PR_ARG_NOPROCwere set and no process or core file could be found corresponding to arg.
|May 22, 2020||OmniOS|