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/Prelease.3proc
+++ new/usr/src/man/man3proc/Prelease.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 .\"
↓ open down ↓ |
10 lines elided |
↑ open up ↑ |
11 11 .\"
12 12 .\" Copyright 2015 Joyent, Inc.
13 13 .\"
14 14 .Dd May 11, 2016
15 15 .Dt PRELEASE 3PROC
16 16 .Os
17 17 .Sh NAME
18 18 .Nm Prelease ,
19 19 .Nm Pfree
20 20 .Nd release a process control handle
21 -.Sh SYNOPSIS
21 +.Sh LIBRARY
22 22 .Lb libproc
23 +.Sh SYNOPSIS
23 24 .In libproc.h
24 25 .Ft void
25 26 .Fo Prelease
26 27 .Fa "struct ps_prochandle *P"
27 28 .Fa "int flags"
28 29 .Fc
29 30 .Ft void
30 31 .Fo Pfree
31 32 .Fa "struct ps_prochandle *P"
32 33 .Fc
33 34 .Sh DESCRIPTION
34 35 The
35 36 .Fn Prelease
36 37 function is used to release all of the resources associated with a
37 38 .Nm libproc
38 39 handle.
39 40 It is suitable for handles to core files, created processes, and grabbed
40 41 processes from the
41 42 .Xr Pgrab_core 3PROC ,
42 43 .Xr Pcreate 3PROC ,
43 44 .Xr Pgrab 3PROC ,
44 45 and
45 46 .Xr Pgrab_file 3PROC
46 47 functions.
47 48 .Pp
48 49 After calling the
49 50 .Fn Prelease
50 51 function, all data that was returned via the handle will no longer be
51 52 valid.
52 53 For example, the data from calls to
53 54 .Xr Pctlfd 3PROC ,
54 55 .Xr Pgetauxvec 3PROC ,
55 56 .Xr Pstatus 3PROC ,
56 57 and others.
57 58 .Pp
58 59 The behavior of the released process is controlled by the
59 60 .Fa flags
60 61 argument.
61 62 By default, if no flags are passed, then the process represented by
62 63 .Fa P
63 64 will be set running if it was created by
64 65 .Xr Pcreate 3PROC
65 66 or if it was not originally stopped or set to stop in /proc.
66 67 The following values may be passed in to the
67 68 .Fa flags
68 69 argument.
69 70 Multiple flags should be be combined with a bitwise-inclusive-OR.
70 71 .Bl -tag -width Er -offset indent
71 72 .It Dv PRELEASE_CLEAR
72 73 When releasing the process, clear all tracing flags that are set on the
73 74 process.
74 75 .It Dv PRELEASE_RETAIN
75 76 When releasing the process, retain all tracing flags that are currently
76 77 active on the process.
77 78 .It Dv PRELEASE_HANG
78 79 Leave the process stopped.
79 80 It will not resume execution unless it is explicitly enabled with
80 81 .Xr prun 1
81 82 or another process explicitly enables it.
82 83 .It Dv PRELEASE_KILL
83 84 Release the process and terminate it with
84 85 .Dv SIGKILL .
85 86 This option takes precedence over all other values that may be passed in to
86 87 .Fa flags .
87 88 .El
88 89 .Pp
89 90 The
90 91 .Fn Pfree
91 92 function is similar to the
92 93 .Fn Prelease
93 94 function in that it frees the resources associated with the process
94 95 handle
95 96 .Fa P ;
96 97 however, unlike the
97 98 .Fn Prelease
98 99 function, it does not handle any logic to change or set the grabbed processes
99 100 state.
100 101 In general, prefer
101 102 .Fn Prelease
102 103 to
103 104 .Fn Pfree .
104 105 .Sh INTERFACE STABILITY
105 106 .Sy Uncommitted
106 107 .Sh MT-LEVEL
107 108 See
108 109 .Sy LOCKING
109 110 in
110 111 .Xr libproc 3LIB .
111 112 .Sh SEE ALSO
112 113 .Xr prun 1 ,
113 114 .Xr libproc 3LIB ,
114 115 .Xr Pcreate 3PROC ,
115 116 .Xr Pgrab 3PROC ,
116 117 .Xr Pgrab_core 3PROC ,
117 118 .Xr proc 4
↓ open down ↓ |
85 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX