Go to main content

man pages section 3: Extended Library Functions, Volume 3

Exit Print View

Updated: Thursday, June 13, 2019
 
 

Plwp_getpsinfo (3PROC)

Name

Plwp_getpsinfo, Plwp_getstatus - lwp information from a victim process

Synopsis

#include <libproc.h>
int Plwp_getpsinfo(struct ps_prochandle *Pr, lwpid_t lwpid,
         lwpsinfo_t *lps, size_t size)
int Plwp_getstatus(struct ps_prochandle *Pr, lwpid_t lwpid,
         lwpstatus_t *lps, size_t size)

Description

The Pr argument identifies a victim process or core file attached to the controlling process by the create and grab interfaces. For more information, see the Pcreate(3PROC) and Pgrab(3PROC) man pages.

The Plwp_getpsinfo() function retrieves the lwpsinfo_t structure of the lwp specified by the lwpid argument into the lps buffer for size bytes. Clients should set size = sizeof (lwpsinfo_t). Requiring a value for size ensures future binary compatibility.

The Plwp_getstatus() function retrieves the lwpstatus_t structure of the lwp specified by the lwpid argument into the lps buffer for size bytes. Clients should set size = sizeof (lwpstatus_t). Requiring a value for size ensures future binary compatibility.

Return Values

On successful completion, the Plwp_getpsinfo() and Plwp_getstatus() functions return 0. On failure, they return -1 and set errno to indicate the error.

Errors

On failure, these errno values may be set:

EAGAIN

Process has been lost to control, need the Preopen() function

EINVAL

Invalid argument

ENODATA

Pr does not refer to a live process or core file

ENOENT

No such lwp

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Committed
MT-Level
Unsafe

See Also

libproc.h(3HEAD), libproc(3LIB), Pcreate(3PROC), Pgrab(3PROC), proc(5)