PCREATE_AGENT(3PROC) | Process Control Library Functions | PCREATE_AGENT(3PROC) |
Pcreate_agent
—
create the agent LWP
Process Control Library (libproc, -lproc)
#include
<libproc.h>
int
Pcreate_agent
(struct ps_prochandle
*P);
The
Pcreate_agent
()
function creates the agent LWP in the process represented by the handle
P. The agent LWP is used as a means to force system
calls to be invoked on the controlled process. For more information on the
agent LWP, see proc(5).
The agent LWP cannot be created for process handles corresponding to core files, zombie processes, processes that have yet to run, and ELF objects.
The
Pcreate_agent
()
function is reentrant. It may be entered recursively. The act of creating
the agent LWP will cause the process to be stopped. For every call to the
Pcreate_agent
() function, a corresponding call to
Pdestroy_agent(3PROC) is
required.
Upon successful completion, the
Pcreate_agent
() function returns
0 and creates
the agent LWP. Otherwise,
-1 is returned,
errno is
set to indicate the error, and the agent LWP is not created.
The Pcreate_agent
() function will fail
if:
ENOENT
Note, it is possible for other error numbers to be returned. If they are, they represent unanticipated failure.
See LOCKING in libproc(3LIB).
May 11, 2016 | OmniOS |