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
+++ new/usr/src/man/man3proc/proc_arg_grab.3proc
1 1 .\"
2 2 .\" This file and its contents are supplied under the terms of the
3 3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
↓ open down ↓ |
3 lines elided |
↑ open up ↑ |
4 4 .\" You may only use this file in accordance with the terms of version
5 5 .\" 1.0 of the CDDL.
6 6 .\"
7 7 .\" A full copy of the text of the CDDL should have accompanied this
8 8 .\" source. A copy of the CDDL is also available via the Internet at
9 9 .\" http://www.illumos.org/license/CDDL.
10 10 .\"
11 11 .\"
12 12 .\" Copyright 2015 Joyent, Inc.
13 13 .\"
14 -.Dd May 11, 2016
14 +.Dd Aug 20, 2019
15 15 .Dt PROC_ARG_GRAB 3PROC
16 16 .Os
17 17 .Sh NAME
18 18 .Nm proc_arg_grab ,
19 -.Nm proc_arg_xrgab
19 +.Nm proc_arg_xgrab
20 20 .Nd process grabbing utility function
21 21 .Sh SYNOPSIS
22 22 .Lb libproc
23 23 .In libproc.h
24 24 .Ft "struct ps_prochandle"
25 25 .Fo proc_arg_grag
26 26 .Fa "const char *arg"
27 27 .Fa "int oflag"
28 28 .Fa "int gflag"
29 29 .Fa "int *perr"
30 30 .Fc
31 31 .Ft "struct ps_prochandle"
32 32 .Fo proc_arg_xgrab
33 33 .Fa "const char *arg"
34 34 .Fa "const char *path"
35 35 .Fa "int oflag"
36 36 .Fa "int gflag"
37 37 .Fa "int *perr"
38 38 .Fa "const char **lwps"
39 39 .Fc
40 40 .Sh DESCRIPTION
41 41 The
42 42 .Fn proc_arg_grab
43 43 and
44 44 .Fn proc_arg_xgrab
45 45 functions are utility functions which process arguments pointing to a
46 46 currently active process or a core file and returns a process handle to
47 47 it.
48 48 .Pp
49 49 The string
50 50 .Fa arg
51 51 contains the name of something to try and open.
52 52 How it is interpreted depends on the value of
53 53 .Fa oflag .
54 54 The following values may be passed in as a bitwise-exclusive-OR for
55 55 .Fa oflag :
56 56 .Bl -tag -width Dv -offset indent
57 57 .It Dv PR_ARG_PIDS
58 58 Allows
59 59 .Fa arg
60 60 to specify process IDs and /proc arguments.
61 61 .It Dv PR_ARG_CORES
62 62 Allows
63 63 .Fa arg
64 64 to specify core files.
65 65 .It PR_ARG_ANY
66 66 Encompasses all of the previous opens.
67 67 .El
68 68 .Pp
69 69 The argument
70 70 .Fa gflag
71 71 controls the behavior when the corresponding process grabbing function
72 72 is called by the underlying system.
73 73 For a list of flags that may be passed in here, see
74 74 .Xr Pgrab 3PROC
75 75 and
76 76 .Xr Pgrab_core 3PROC .
77 77 .Pp
78 78 The argument
79 79 .Fa perr
80 80 must be a
81 81 .Pf non- Dv NULL
82 82 pointer and in the event that the
83 83 .Fn proc_arg_grab
84 84 or
85 85 .Fn proc_arg_xgrab
86 86 functions fail, then
87 87 .Fa perr
88 88 will be updated with a more detailed error number.
89 89 .Pp
90 90 The
91 91 .Fa path
92 92 argument allows a search path for its binaries to be specified in case a
93 93 core file is found and opened.
94 94 .Pp
95 95 If the
96 96 .Fa lwps
97 97 argument is
98 98 .Pf non- Dv NULL ,
99 99 then if there is a thread specification present in
100 100 .Fa arg ,
101 101 it will be validated to see if it is a valid range and then a pointer to
102 102 the start of the thread specification will be stored in
103 103 .Fa lwps .
104 104 For more information on determining process range validity, see
105 105 .Xr proc_lwp_range_valid 3PROC
106 106 for more information on valid and invalid tread specifications.
107 107 .Sh RETURN VALUES
108 108 Upon successful completion, the
109 109 .Fn proc_arg_grab
110 110 and
111 111 .Fn proc_arg_xgrab
112 112 functions return a pointer to the process handle is returned.
113 113 Otherwise,
114 114 .Dv NULL
115 115 is returned and
116 116 .Fa perr
117 117 is set to include a more specific error.
118 118 .Sh ERRORS
119 119 For a full list of additional errors, see the
120 120 .Sy ERRORS
121 121 section in
122 122 .Xr Pgrab 3PROC
123 123 and
124 124 .Xr Pgrab_core 3PROC .
125 125 .Pp
126 126 The
127 127 .Fn proc_arg_grab
128 128 and
129 129 .Fn proc_arg_xgrab
130 130 function will fail if:
131 131 .Bl -tag -width Er
132 132 .It Er G_BADLWPS
133 133 .Fa arg
134 134 contains an invalid thread specification.
135 135 .It Er G_NOCORE
136 136 .Dv PR_ARG_CORES
137 137 was set and no core file could be found corresponding to
138 138 .Fa arg .
139 139 .It Er G_NOPROC
140 140 .Dv PR_ARG_PIDS
141 141 was set and no process could be found corresponding to
142 142 .Fa arg .
143 143 .It Er G_NOPROCORCORE
144 144 Both
145 145 .Dv PR_ARG_CORES
146 146 and
147 147 .Dv PR_ARG_NOPROC
148 148 were set and no process or core file could be found corresponding to
149 149 .Fa arg .
150 150 .El
151 151 .Sh INTERFACE STABILITY
152 152 .Sy Uncommitted
153 153 .Sh MT-LEVEL
154 154 .Sy MT-Safe
155 155 .Sh SEE ALSO
156 156 .Xr libproc 3LIB ,
157 157 .Xr Pgrab 3PROC ,
158 158 .Xr Pgrab_core 3PROC ,
159 159 .Xr Prelease 3PROC ,
160 160 .Xr proc_lwp_range_valid 3PROC ,
161 161 .Xr proc 4
↓ open down ↓ |
132 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX