_lwp_kill(2) _lwp_kill(2)
NAME
_lwp_kill - send a signal to a sibling lightweight process
SYNOPSIS
#include <sys/types.h>
#include <sys/lwp.h>
#include <sys/signal.h>
int _lwp_kill(lwpid_t lwpid, int sig);
Parameters
lwpid LWP ID of the LWP to receive the signal
sig signal number of the signal to be sent
DESCRIPTION
_lwp_kill sends a signal sig to a sibling lightweight process
(LWP) lwpid. _lwp_kill is the LWP analog of kill.
_lwp_kill functions irrespective of whether the LWP identified
by lwpid was created with the LWP_DETACHED flag set.
Job control signals sent to individual LWPs affect the process
as a whole.
Uncatchable signals cannot be sent to the init process.
_lwp_kill can succeed (in posting the signal) even if the
target lwpid has been suspended by _lwp_suspend.
lwpid Parameter
lwpid is the LWP ID of the sibling LWP which is to receive the
signal. The scope of lwpid is the process with which the
sender is associated; signals cannot be sent to a non-sibling
LWP, that is, signals cannot be sent to an LWP in another
process using _lwp_kill.
sig Parameter
sig is the signal number of the signal to be sent, and is
either 0 or a value from the list given in signal(5). If sig
is 0 (the null signal), error checking is performed but no
signal is actually sent; this can be used to check the
validity of lwpid.
Return Values
_lwp_kill returns zero for success and an error number for
failure, as described below.
Copyright 1994 Novell, Inc. Page 1
_lwp_kill(2) _lwp_kill(2)
Errors
If any of the following conditions is detected, _lwp_kill
returns the corresponding value:
EINVAL The sig argument contains an invalid or unsupported
signal number.
EPERM The sig argument is SIGKILL or SIGSTOP and the target
LWP is in process 1 (init).
ESRCH No LWP can be found in the current process with
identity lwpid.
REFERENCES
kill(2), sigaction(2), signal(2), sigsend(2),
thr_kill(3thread)
NOTICES
Lightweight processes (LWPs) are internal interfaces and are
subject to change. Their use should be avoided.
Copyright 1994 Novell, Inc. Page 2