Print this page
11586 NAME field in man pages should match what's installed
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3proc/proc_arg_grab.3proc.man.txt
+++ new/usr/src/man/man3proc/proc_arg_grab.3proc.man.txt
1 1 PROC_ARG_GRAB(3PROC) Process Control Library Functions PROC_ARG_GRAB(3PROC)
2 2
3 3 NAME
4 - proc_arg_grab, proc_arg_xrgab - process grabbing utility function
4 + proc_arg_grab, proc_arg_xgrab - process grabbing utility function
5 5
6 6 SYNOPSIS
7 7 Process Control Library (libproc, -lproc)
8 8 #include <libproc.h>
9 9
10 10 struct ps_prochandle
11 11 proc_arg_grag(const char *arg, int oflag, int gflag, int *perr);
12 12
13 13 struct ps_prochandle
14 14 proc_arg_xgrab(const char *arg, const char *path, int oflag, int gflag,
15 15 int *perr, const char **lwps);
16 16
17 17 DESCRIPTION
18 18 The proc_arg_grab() and proc_arg_xgrab() functions are utility functions
19 19 which process arguments pointing to a currently active process or a core
20 20 file and returns a process handle to it.
21 21
22 22 The string arg contains the name of something to try and open. How it is
23 23 interpreted depends on the value of oflag. The following values may be
24 24 passed in as a bitwise-exclusive-OR for oflag:
25 25
26 26 PR_ARG_PIDS Allows arg to specify process IDs and /proc
27 27 arguments.
28 28
29 29 PR_ARG_CORES Allows arg to specify core files.
30 30
31 31 PR_ARG_ANY Encompasses all of the previous opens.
32 32
33 33 The argument gflag controls the behavior when the corresponding process
34 34 grabbing function is called by the underlying system. For a list of
35 35 flags that may be passed in here, see Pgrab(3PROC) and Pgrab_core(3PROC).
36 36
37 37 The argument perr must be a non-NULL pointer and in the event that the
38 38 proc_arg_grab() or proc_arg_xgrab() functions fail, then perr will be
39 39 updated with a more detailed error number.
40 40
41 41 The path argument allows a search path for its binaries to be specified
42 42 in case a core file is found and opened.
43 43
44 44 If the lwps argument is non-NULL, then if there is a thread specification
45 45 present in arg, it will be validated to see if it is a valid range and
46 46 then a pointer to the start of the thread specification will be stored in
47 47 lwps. For more information on determining process range validity, see
48 48 proc_lwp_range_valid(3PROC) for more information on valid and invalid
49 49 tread specifications.
50 50
51 51 RETURN VALUES
52 52 Upon successful completion, the proc_arg_grab() and proc_arg_xgrab()
53 53 functions return a pointer to the process handle is returned. Otherwise,
54 54 NULL is returned and perr is set to include a more specific error.
55 55
56 56 ERRORS
57 57 For a full list of additional errors, see the ERRORS section in
58 58 Pgrab(3PROC) and Pgrab_core(3PROC).
59 59
60 60 The proc_arg_grab() and proc_arg_xgrab() function will fail if:
61 61
62 62 G_BADLWPS arg contains an invalid thread specification.
63 63
64 64 G_NOCORE PR_ARG_CORES was set and no core file could be found
65 65 corresponding to arg.
66 66
67 67 G_NOPROC PR_ARG_PIDS was set and no process could be found
68 68 corresponding to arg.
69 69
70 70 G_NOPROCORCORE Both PR_ARG_CORES and PR_ARG_NOPROC were set and no
71 71 process or core file could be found corresponding to
72 72 arg.
73 73
↓ open down ↓ |
59 lines elided |
↑ open up ↑ |
74 74 INTERFACE STABILITY
75 75 Uncommitted
76 76
77 77 MT-LEVEL
78 78 MT-Safe
79 79
80 80 SEE ALSO
81 81 libproc(3LIB), Pgrab(3PROC), Pgrab_core(3PROC), Prelease(3PROC),
82 82 proc_lwp_range_valid(3PROC), proc(4)
83 83
84 -illumos May 11, 2016 illumos
84 +illumos August 20, 2019 illumos
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX