PLWP_GETNAME(3PROC) Process Control Library Functions PLWP_GETNAME(3PROC)
- get thread name
Process Control Library (libproc, -lproc)
SYNOPSIS #include <libproc.h> int Plwp_getname
(struct ps_prochandle *P
, lwpid_t lwpid
, char *buf
, size_t bufsize
() 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.
() 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.
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(4)
() function will fail if:
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. P
ENAMETOOLONG The buffer is not sufficient to hold the thread name.
INTERFACE STABILITY UncommittedMT-LEVEL
SEE ALSO libproc(3LIB)
illumos August 31, 2018 illumos