PLWP_GETPSINFO(3PROC) Process Control Library Functions

NAME


Plwp_getpsinfo - get thread specific ps information

LIBRARY


Process Control Library (libproc, -lproc)

SYNOPSIS


#include <libproc.h>

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

DESCRIPTION


The Plwp_getpsinfo() 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 lwpsinfo_t, 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 Plwp_getpsinfo() 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.

RETURN VALUES


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

ERRORS


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

The Plwp_getpsinfo() function will fail if:

ENODATA P refers to a file handle obtained through
Pgrab_file(3PROC).

EINVAL The process handle P refers to a core file and the
specified thread does not exist.

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

INTERFACE STABILITY


Uncommitted

MT-LEVEL
See LOCKING in ps(1), libproc(3LIB).

SEE ALSO


libproc(3LIB), proc(5)

illumos May 11, 2016 illumos

tribblix@gmail.com :: GitHub :: Privacy