Print this page
8158 Want named threads API
9857 proc manpages should have LIBRARY section
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3proc/Pzonename.3proc
+++ new/usr/src/man/man3proc/Pzonename.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.
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 .\"
↓ open down ↓ |
11 lines elided |
↑ open up ↑ |
12 12 .\" Copyright 2015 Joyent, Inc.
13 13 .\"
14 14 .Dd May 11, 2016
15 15 .Dt PZONENAME 3PROC
16 16 .Os
17 17 .Sh NAME
18 18 .Nm Pzonename ,
19 19 .Nm Pzoneroot ,
20 20 .Nm Pzonepath
21 21 .Nd get zone name, root, and full object path
22 -.Sh SYNOPSIS
22 +.Sh LIBRARY
23 23 .Lb libproc
24 +.Sh SYNOPSIS
24 25 .In libproc.h
25 26 .Ft char *
26 27 .Fo Pzonename
27 28 .Fa "struct ps_prochandle *P"
28 29 .Fa "char *buf"
29 30 .Fa "size_t nbyte"
30 31 .Fc
31 32 .Ft char *
32 33 .Fo Pzoneroot
33 34 .Fa "struct ps_prochandle *P"
34 35 .Fa "char *buf"
35 36 .Fa "size_t nbyte"
36 37 .Fc
37 38 .Ft char *
38 39 .Fo Pzonepath
39 40 .Fa "struct ps_prochandle *P"
40 41 .Fa "const char *path"
41 42 .Fa "char *buf"
42 43 .Fa "size_t nbyte"
43 44 .Fc
44 45 .Sh DESCRIPTION
45 46 The
46 47 .Fn Pzonename
47 48 function attempts to determine the name of the zone for the process
48 49 handle
49 50 .Fa P .
50 51 If found, up to
51 52 .Fa nbytes ,
52 53 including a null terminator, will be written into
53 54 .Fa buf .
54 55 .Pp
55 56 The
56 57 .Fn Pzoneroot
57 58 function attempts to determine the root of the zone corresponding to the
58 59 process handle
59 60 .Fa P .
60 61 If found, up to
61 62 .Fa nbytes ,
62 63 including a null terminator, will be written into
63 64 .Fa buf .
64 65 If the root cannot be found, for example a core file that did not
65 66 originate on the current system, then the empty string will be written
66 67 into
67 68 .Fa buf .
68 69 .Pp
69 70 The
70 71 .Fn Pzonepath
71 72 function attempts to derive the full path of the object
72 73 .Fa path
73 74 in a zone relative to the root associated with the current process
74 75 handle
75 76 .Fa P .
76 77 If found, up to
77 78 .Fa nbytes ,
78 79 including a null terminator, will be written into
79 80 .Fa buf .
80 81 It is legal to use the same buffer for both
81 82 .Fa path
82 83 and
83 84 .Fa buf ;
84 85 it will not be updated unless the function completes successfully.
85 86 .Sh RETURN VALUES
86 87 Upon successful completion, the
87 88 .Fn Pzonename ,
88 89 .Fn Pzoneroot ,
89 90 and
90 91 .Fn Pzonepath
91 92 functions return
92 93 .Sy buf .
93 94 Otherwise, if an error occurred,
94 95 .Dv NULL
95 96 is returned and
96 97 .Sy errno
97 98 is set.
98 99 .Sh ERRORS
99 100 The
100 101 .Fn Pzonename
101 102 and
102 103 .Fn Pzoneroot
103 104 functions will fail if:
104 105 .Bl -tag -width Er
105 106 .It Er ENODATA
106 107 .Fa P
107 108 refers to a core file and zone information was not available in the core
108 109 dump or
109 110 .Fa P
110 111 refers to an ELF object grabbed through
111 112 .Xr Pgrab_file 3PROC .
112 113 .It Er EFAULT
113 114 .Fa P
114 115 refers to an active process and
115 116 .Fa buf
116 117 is invalid.
117 118 .El
118 119 .Pp
119 120 The
120 121 .Fn Pzoneroot
121 122 function will fail if:
122 123 .Bl -tag -width Er
123 124 .It Er ENOMEM
124 125 Insufficient memory was available on the system.
125 126 .El
126 127 .Sh INTERFACE STABILITY
127 128 .Sy Uncommitted
128 129 .Sh MT-LEVEL
129 130 See
130 131 .Sy LOCKING
131 132 in
132 133 .Xr libproc 3LIB .
133 134 .Sh SEE ALSO
134 135 .Xr getzoneidbyname 3C ,
135 136 .Xr libproc 3LIB ,
136 137 .Xr proc 4
↓ open down ↓ |
103 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX