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
65 to be stopped. Stopping a process causes all of its threads to stop
66 execution. Where in their execution the threads will halt is not
67 defined. Threads may be resumed with
74 argument should be one of the following symbols:
75 .Bl -tag -width Dv -offset indent
77 Stop the process; wait for completion before returning.
79 Stop the process; do not wait for completion before returning. That
80 is, the stopping of the process is performed asynchronously in
81 relation to the caller.
83 Do not direct the process to stop; simply wait for it to stop.
85 Do not direct the process to stop; simply refreshes the state of the
93 requests allow an upper bound on the amount of time to wait for the
96 argument indicates the number of milliseconds to wait for the stop to
97 complete. If the value of
101 then it will wait forever. Callers should pass
110 When a non-zero timeout is specified, the process may or may not be
111 stopped upon return. The return value does not reflect the current
112 state of the process. For example, if the timeout expires during a
114 request, the return value will be
116 regardless of the actual state of the process.
118 Only active processes may be stopped. Handles that refer to core
119 files, zombie processes, or files cannot be used; unless the value of
126 function is is equivalent to calling the
128 function with the request set to
130 and an infinite timeout.
134 function is is equivalent to calling the
136 function with the request set to
138 and an infinite timeout.
142 function is is equivalent to calling the
144 function with the request set to
152 functions are equivalent to the
157 functions, respectively. Except, rather than operating on a process,
158 they operate on the thread handle
162 stops only a single thread; whereas
164 stops every thread in the process.
166 Upon successful completion, the
181 is set to indicate the error that occurred.
183 For a full list of possible errors see the
197 functions will fail if:
200 Control over the handle
202 was lost. Callers should call
204 For more information on losing control, see
205 .Sy PROGRAMMING NOTES
211 and the process handle
213 does not refer to an active process, but refers to a core file, a zombie
217 is not valid or the process is in an unknown state.
219 A fatal protocol error occurred and the process could not be stopped.
221 .Sh INTERFACE STABILITY
233 .Xr Pgrab_core 3PROC ,
234 .Xr Pgrab_file 3PROC ,