PCREATE_AGENT(3PROC) Process Control Library Functions PCREATE_AGENT(3PROC)

Pcreate_agentcreate the agent LWP

Process Control Library (libproc, -lproc)

#include <libproc.h>

Pcreate_agent(struct ps_prochandle *P);

The () 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 () 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 and creates the agent LWP. Otherwise, is returned, is set to indicate the error, and the agent LWP is not created.

The Pcreate_agent() function will fail if:

The process referred to by P is a core file, zombie, ELF object, or has not begun execution.

Note, it is possible for other error numbers to be returned. If they are, they represent unanticipated failure.

See in libproc(3LIB).

libproc(3LIB), Pdestroy_agent(3PROC), proc(5)

May 11, 2016 OmniOS