thr_kill(3thread) thr_kill(3thread)
NAME
thr_kill - send a signal to a sibling thread
SYNOPSIS
cc [options] -Kthread file
#include <thread.h>
int thr_kill(thread_t tid, int sig)
Parameters
tid thread ID of the thread to receive the signal
sig signal number of the signal to be sent
DESCRIPTION
thr_kill sends the signal sig to the sibling thread tid.
If tid is blocking signal sig, the signal will become pending
for tid.
thr_kill is the thread analog of kill(2).
tid Parameter
tid is the thread ID of the sibling thread which is to receive
the signal. A thread cannot send a signal to a thread in
another process (a non-sibling thread).
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 tid.
To maintain integrity of the Threads Library implementation,
threads cannot send SIGLWP or SIGWAITING.
Return Values
thr_kill returns zero for success and an error number for
failure, as described below.
Errors
If any of the following conditions occurs, thr_kill returns
the corresponding value:
Copyright 1994 Novell, Inc. Page 1
thr_kill(3thread) thr_kill(3thread)
EINVAL sig is not a valid signal number or is either SIGLWP
or SIGWAITING.
ESRCH tid cannot be found in the current process
REFERENCES
kill(2), signal(5), sigwait(2), thr_sigsetmask(3thread),
thread(3thread)
Copyright 1994 Novell, Inc. Page 2