PLWP_GETNAME(3PROC) | Process Control Library Functions | PLWP_GETNAME(3PROC) |
Plwp_getname
— get
thread name
Process Control Library (libproc, -lproc)
#include
<libproc.h>
int
Plwp_getname
(struct ps_prochandle
*P, lwpid_t lwpid, char
*buf, size_t bufsize);
The
Plwp_getname
()
function returns the thread name in the supplied buffer, from the thread
lwpid in the process handle
P.
If no thread name is set, the buffer is set to the empty string.
The buffer should be at least THREAD_NAME_MAX
in
size.
The
Plwp_getname
()
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_getname
() function returns 0. Otherwise,
-1 is returned,
errno is
set to indicate the error. The buffer may be modified even if an error is
returned.
For a full list of possible errors also see the DIAGNOSTICS section in proc(5).
The Plwp_getname
() function will fail
if:
ENODATA
EINVAL
ENOENT
ENAMETOOLONG
See LOCKING in libproc(3LIB).
August 31, 2018 | OmniOS |