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/Plwp_getspymaster.3proc
+++ new/usr/src/man/man3proc/Plwp_getspymaster.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.
↓ open down ↓ |
9 lines elided |
↑ open up ↑ |
10 10 .\"
11 11 .\"
12 12 .\" Copyright 2015 Joyent, Inc.
13 13 .\"
14 14 .Dd May 11, 2016
15 15 .Dt PLWP_GETSPYMASTER 3PROC
16 16 .Os
17 17 .Sh NAME
18 18 .Nm Plwp_getspymaster
19 19 .Nd get agent LWP spy master information
20 -.Sh SYNOPSIS
20 +.Sh LIBRARY
21 21 .Lb libproc
22 +.Sh SYNOPSIS
22 23 .In libproc.h
23 24 .Ft int
24 25 .Fo Plwp_getspymaster
25 26 .Fa "struct ps_prochandle *P"
26 27 .Fa "lwpid_t lwpid"
27 28 .Fa "psinfo_t *ps"
28 29 .Fc
29 30 .Sh DESCRIPTION
30 31 The
31 32 .Fn Plwp_getspymaster
32 33 function returns information about the spy master that corresponds to
33 34 the agent LWP for the thread
34 35 .Fa lwpid
35 36 in the process handle
36 37 .Fa P .
37 38 .Pp
38 39 The agent LWP allows another process to inject actions into the target process.
39 40 When an agent LWP is created, it leverages an existing thread in the process and
40 41 it also creates a record of whom created the agent, which is called the spy
41 42 master.
42 43 For more information on the agent LWP and the spy master, see
43 44 .Xr proc 4 .
44 45 .Pp
45 46 If the thread identified
46 47 .Fa lwpid
47 48 has an agent LWP, the corresponding ps information
48 49 .Po see
49 50 .Xr proc 4
50 51 for the definition of the
51 52 .Sy psinfo_t
52 53 .Pc
53 54 will be filled into
54 55 .Fa ps .
55 56 .Pp
56 57 Note, process handles that correspond to a file, created by
57 58 .Xr Pgrab_file 3PROC ,
58 59 cannot have an agent LWP created for them and thus cannot have any spy
59 60 master information.
60 61 In addition, core files from older releases may not have any data on the spy
61 62 master.
62 63 .Sh RETURN VALUES
63 64 Upon successful completion, the
64 65 .Fn Plwp_getspymaster
65 66 returns
66 67 .Sy 0
67 68 and updates
68 69 .Fa ps .
69 70 Otherwise, it returns
70 71 .Sy -1 ,
71 72 sets
72 73 .Sy errno ,
73 74 and
74 75 .Fa ps
75 76 is not modified.
76 77 .Sh ERRORS
77 78 For a full list of possible errors also see the
78 79 .Sy DIAGNOSTICS
79 80 section in
80 81 .Xr proc 4 .
81 82 .Pp
82 83 The
83 84 .Fn Plwp_getpsinfo
84 85 function will fail if:
85 86 .Bl -tag -width Er
86 87 .It Er ENODATA
87 88 .Fa P
88 89 refers to a file handle obtained through
89 90 .Xr Pgrab_file 3PROC
90 91 or
91 92 .Fa P
92 93 does not have any information about the spy master.
93 94 .It Er EINVAL
94 95 The process handle
95 96 .Fa P
96 97 refers to a core file and the specified thread does not exist.
97 98 .Pp
98 99 The thread,
99 100 .Fa lwpid
100 101 does not have an active agent,
101 102 .Dv PR_AGENT
102 103 is not set in the
103 104 .Sy pr_flags
104 105 member of the thread's status information.
105 106 .It Er ENOENT
106 107 The process handle
107 108 .Fa P
108 109 refers to an active process and the specified thread does not exist.
109 110 .El
110 111 .Sh INTERFACE STABILITY
111 112 .Sy Uncommitted
112 113 .Sh MT-LEVEL
113 114 See
114 115 .Sy LOCKING
115 116 in
116 117 .Xr libproc 3LIB .
117 118 .Sh SEE ALSO
118 119 .Xr libproc 3LIB ,
119 120 .Xr proc 4
↓ open down ↓ |
88 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX