|PROC_ARG_GRAB(3PROC)||Process Control Library Functions||PROC_ARG_GRAB(3PROC)|
proc_arg_grag(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);
proc_arg_xgrab() functions are utility functions which process arguments pointing to a currently active process or a core file and returns a process handle to it.
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 argument perr must be a
NULL pointer and in the event that the
proc_arg_xgrab() functions fail, then
perr will be updated with a more detailed error
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 if there is a thread specification
present in arg, it will be validated to see if it is a
valid range and then a pointer to the start of the thread specification will
be stored in lwps. For more information on determining
process range validity, see proc_lwp_range_valid(3PROC)
for more information on valid and invalid tread specifications.
proc_arg_xgrab() functions return a pointer to the process handle is returned. Otherwise,
NULLis 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.
|August 20, 2019||illumos|