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.
15 .Dt PCREATE_AGENT 3PROC
19 .Nd create the agent LWP
25 .Fa "struct ps_prochandle *P"
30 function creates the agent LWP in the process represented by the handle
32 The agent LWP is used as a means to force system calls to be invoked on
33 the controlled process.
34 For more information on the agent LWP, see
37 The agent LWP cannot be created for process handles corresponding to
38 core files, zombie processes, processes that have yet to run, and ELF
43 function is reentrant.
44 It may be entered recursively.
45 The act of creating the agent LWP will cause the process to be stopped.
48 function, a corresponding call to
49 .Xr Pdestroy_agent 3PROC
52 Upon successful completion, the
56 and creates the agent LWP.
61 is set to indicate the error, and the agent LWP is not created.
65 function will fail if:
68 The process referred to by
70 is a core file, zombie, ELF object, or has not begun execution.
73 Note, it is possible for other error numbers to be returned.
74 If they are, they represent unanticipated failure.
75 .Sh INTERFACE STABILITY
84 .Xr Pdestroy_agent 3PROC ,