get agent LWP spy master information
Process Control Library (libproc, -lproc)
, lwpid_t lwpid
() function returns
information about the spy master that corresponds to the agent LWP for the
in the process handle
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
If the thread identified lwpid
has an agent
LWP, the corresponding ps information (see
for the definition of the
) will be filled into
Note, process handles that correspond to a file, created by
, 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
. Otherwise, it returns
, sets errno
is not modified.
For a full list of possible errors also see the
() function will fail if:
- P refers to a file handle obtained
through Pgrab_file(3PROC) or
P does not have any information about the
- The process handle P refers to a core
file and the specified thread does not exist.
The thread, lwpid does not have an active
PR_AGENT is not set in the
pr_flags member of the thread's status
- The process handle P refers to an active
process and the specified thread does not exist.