_lwp_kill(2)_lwp_kill(2)NAME_lwp_kill() - send a signal to an LWP (Lightweight Process)
SYNOPSISDESCRIPTION
The function sends a signal to the LWP target_lwp. The target_lwp can
be in any process. is the LWP equivalent of kill().
The signal to be sent is specified by sig and is either one from the
list given in signal(5), or 0. If sig is (the null signal), error
checking is performed but no signal is actually sent. This can be used
to check the validity of the LWP target_lwp.
If the LWP target_lwp is in another process, the real or effective user
ID of the sending process must match the real or saved user ID of the
receiving process unless the effective user ID of the sending process
is a user who has appropriate privileges.
If the signal action for sig specifies termination, stop or continue,
the entire process is terminated, stopped or continued, respectively.
Uncatchable signals (for example, SIGKILL and SIGSTOP) cannot be sent
to an LWP in the init process.
Signals cannot be sent to kernel daemon threads and helper threads cre‐
ated internally by the HP-UX system.
RETURN VALUE
Upon successful completion, returns with a value of 0; otherwise, it
returns an error number to indicate the error. The variable is NOT set
if an error occurs.
ERRORS
If any of the following conditions occur, the function fails and
returns the corresponding error number:
sig is neither a valid signal number nor zero.
sig is SIGKILL or SIGSTOP and target_lwp is an LWP in the
process with pid (proc1).
The caller does not have the necessary privileges.
No LWP can be found with the identity
target_lwp.
WARNINGS
In general, the POSIX pthread interfaces should be used by multi-
threaded applications. This system call may be used directly only when
the application has a need to operate on LWPs in another process. This
system call may result in undefined behavior if the usage is mixed with
POSIX pthread APIs.
SEE ALSOkill(1), _lwp_self(2), kill(2), sigaction(2), pthread_kill(3T), sig‐
nal(5).
_lwp_kill(2)