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.
20 .Nd release a process control handle
26 .Fa "struct ps_prochandle *P"
31 .Fa "struct ps_prochandle *P"
36 function is used to release all of the resources associated with a
38 handle. It is suitable for handles to core files, created processes, and
39 grabbed processes from the
40 .Xr Pgrab_core 3PROC ,
49 function, all data that was returned via the handle will no longer be
50 valid. For example, the data from calls to
52 .Xr Pgetauxvec 3PROC ,
56 The behavior of the released process is controlled by the
58 argument. By default, if no flags are passed, then the process
61 will be set running if it was created by
63 or if it was not originally stopped or set to stop in /proc. The
64 following values may be passed in to the
66 argument. Multiple flags should be be combined with a
68 .Bl -tag -width Er -offset indent
70 When releasing the process, clear all tracing flags that are set on the
72 .It Dv PRELEASE_RETAIN
73 When releasing the process, retain all tracing flags that are currently
74 active on the process.
76 Leave the process stopped. It will not resume execution unless it is
77 explicitly enabled with
79 or another process explicitly enables it.
81 Release the process and terminate it with
82 .Dv SIGKILL . This option takes precedence over all other values that may
89 function is similar to the
91 function in that it frees the resources associated with the process
96 function, it does not handle any logic to change or set the grabbed processes
97 state. In general, prefer
101 .Sh INTERFACE STABILITY
113 .Xr Pgrab_core 3PROC ,