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

Plwp_getspymasterget agent LWP spy master information

Process Control Library (libproc, -lproc)

#include <libproc.h>

int
Plwp_getspymaster(struct ps_prochandle *P, lwpid_t lwpid, psinfo_t *ps);

The () function returns information about the spy master that corresponds to the agent LWP for the thread lwpid in the process handle P.

The agent LWP allows another process to inject actions into the target process. When an agent LWP is created, it leverages an existing thread in the process and it also creates a record of whom created the agent, which is called the spy master. For more information on the agent LWP and the spy master, see proc(5).

If the thread identified lwpid has an agent LWP, the corresponding ps information (see proc(5) for the definition of the ) will be filled into ps.

Note, process handles that correspond to a file, created by Pgrab_file(3PROC), cannot have an agent LWP created for them and thus cannot have any spy master information. In addition, core files from older releases may not have any data on the spy master.

Upon successful completion, the Plwp_getspymaster() returns and updates ps. Otherwise, it returns , sets , and ps is not modified.

For a full list of possible errors also see the section in proc(5).

The Plwp_getpsinfo() function will fail if:

P refers to a file handle obtained through Pgrab_file(3PROC) or P does not have any information about the spy master.
The process handle P refers to a core file and the specified thread does not exist.

The thread, lwpid does not have an active agent, PR_AGENT is not set in the member of the thread's status information.

The process handle P refers to an active process and the specified thread does not exist.

See in libproc(3LIB).

libproc(3LIB), proc(5)

May 11, 2016 OmniOS