Plwp_getpsinfo, Plwp_getstatus - lwp information from a victim process
#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)
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.
On successful completion, the Plwp_getpsinfo() and Plwp_getstatus() functions return 0. On failure, they return -1 and set errno to indicate the error.
On failure, these errno values may be set:
Process has been lost to control, need the Preopen() function
Invalid argument
Pr does not refer to a live process or core file
No such lwp
See attributes(7) for descriptions of the following attributes:
|
libproc.h(3HEAD), libproc(3LIB), Pcreate(3PROC), Pgrab(3PROC), proc(5)