2 .\" This file and its contents are supplied under the terms of the
3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
4 .\" You may only use this file in accordance with the terms of version
7 .\" A full copy of the text of the CDDL should have accompanied this
8 .\" source. A copy of the CDDL is also available via the Internet at
9 .\" http://www.illumos.org/license/CDDL.
12 .\" Copyright 2015 Joyent, Inc.
25 .Nd process and thread stop operations
31 .Fa "struct ps_prochandle *P"
35 .Fa "struct ps_prochandle *P"
41 .Fa "struct ps_prochandle *P"
45 .Fa "struct ps_prochandle *P"
49 .Fa "struct ps_lwphandle *L"
53 .Fa "struct ps_lwphandle *L"
57 .Fa "struct ps_lwphandle *L"
62 function allows the caller to stop and optionally wait for the process
66 Stopping a process causes all of its threads to stop execution.
67 Where in their execution the threads will halt is not defined.
68 Threads may be resumed with
75 argument should be one of the following symbols:
76 .Bl -tag -width Dv -offset indent
78 Stop the process; wait for completion before returning.
80 Stop the process; do not wait for completion before returning.
81 That is, the stopping of the process is performed asynchronously in
82 relation to the caller.
84 Do not direct the process to stop; simply wait for it to stop.
86 Do not direct the process to stop; simply refreshes the state of the
94 requests allow an upper bound on the amount of time to wait for the
98 argument indicates the number of milliseconds to wait for the stop to
104 then it will wait forever.
114 When a non-zero timeout is specified, the process may or may not be
116 The return value does not reflect the current state of the process.
117 For example, if the timeout expires during a
119 request, the return value will be
121 regardless of the actual state of the process.
123 Only active processes may be stopped.
124 Handles that refer to core files, zombie processes, or files cannot be used;
132 function is is equivalent to calling the
134 function with the request set to
136 and an infinite timeout.
140 function is is equivalent to calling the
142 function with the request set to
144 and an infinite timeout.
148 function is is equivalent to calling the
150 function with the request set to
158 functions are equivalent to the
163 functions, respectively.
164 Except, rather than operating on a process, they operate on the thread handle
168 stops only a single thread; whereas
170 stops every thread in the process.
172 Upon successful completion, the
187 is set to indicate the error that occurred.
189 For a full list of possible errors see the
203 functions will fail if:
206 Control over the handle
211 For more information on losing control, see
212 .Sy PROGRAMMING NOTES
218 and the process handle
220 does not refer to an active process, but refers to a core file, a zombie
224 is not valid or the process is in an unknown state.
226 A fatal protocol error occurred and the process could not be stopped.
228 .Sh INTERFACE STABILITY
240 .Xr Pgrab_core 3PROC ,
241 .Xr Pgrab_file 3PROC ,