1thr_kill(3C) Standard C Library Functions thr_kill(3C)
2
3
4
6 thr_kill - send a signal to a thread
7
9 cc -mt [ flag... ] file... [ library... ]
10 #include <signal.h>
11 #include <thread.h>
12
13 int thr_kill(thread_t thread, int sig);
14
15
17 The thr_kill() function sends the sig signal to the thread designated
18 by thread. The thread argument must be a member of the same process as
19 the calling thread. The sig argument must be one of the signals listed
20 in signal.h(3HEAD), with the exception of SIGCANCEL being reserved and
21 off limits to thr_kill(). If sig is 0, a validity check is done for the
22 existence of the target thread; no signal is sent.
23
25 Upon successful completion, thr_kill() returns 0. Otherwise, an error
26 number is returned. In the event of failure, no signal is sent.
27
29 The thr_kill() function will fail if:
30
31 EINVAL The sig argument value is not zero and is an invalid or an
32 unsupported signal number.
33
34
35 ESRCH No thread was found that corresponded to the thread desig‐
36 nated by thread ID.
37
38
40 See attributes(5) for descriptions of the following attributes:
41
42
43
44
45 ┌─────────────────────────────┬─────────────────────────────┐
46 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
47 ├─────────────────────────────┼─────────────────────────────┤
48 │MT-Level │Async-Signal-Safe │
49 └─────────────────────────────┴─────────────────────────────┘
50
52 kill(2), sigaction(2), raise(3C), signal.h(3HEAD), thr_self(3C),
53 attributes(5), standards(5)
54
55
56
57SunOS 5.11 23 Mar 2005 thr_kill(3C)