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

Plwp_getpsinfoget thread specific ps information

Process Control Library (libproc, -lproc)

#include <libproc.h>

int
Plwp_getpsinfo(struct ps_prochandle *P, lwpid_t lwpid, lwpsinfo_t *lps);

The () function looks up the thread-specific ps(1) information for the thread specified by lwpid in the process handle P. The caller should provide a pointer to an , lps, whose definition can be found in proc(5). lps will be filled in with information such as the thread's id, its current state, priority, and run-time.

The () function only works on process handles that refer to active processes and core files, it does not work on process handles that refer to individual files.

Upon successful completion, the Plwp_getpsinfo() function returns and lps is filled in with the thread-specific ps(1) information. Otherwise, is returned and is set to indicate the error.

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).
The process handle P refers to a core file and the specified thread does not exist.
The process handle P refers to an active process and the specified thread does not exist.

See in ps(1), libproc(3LIB).

libproc(3LIB), proc(5)

May 11, 2016 OmniOS