1 .\" Hey Emacs! This file is -*- nroff -*- source.
3 .\" Copyright (C) 2008 Michael Kerrisk <tmk.manpages@gmail.com>
4 .\" and Copyright 2003 Abhijit Menon-Sen <ams@wiw.org>
6 .\" Permission is granted to make and distribute verbatim copies of this
7 .\" manual provided the copyright notice and this permission notice are
8 .\" preserved on all copies.
10 .\" Permission is granted to copy and distribute modified versions of this
11 .\" manual under the conditions for verbatim copying, provided that the
12 .\" entire resulting derived work is distributed under the terms of a
13 .\" permission notice identical to this one.
15 .\" Since the Linux kernel and libraries are constantly changing, this
16 .\" manual page may be incorrect or out-of-date. The author(s) assume no
17 .\" responsibility for errors or omissions, or for damages resulting from
18 .\" the use of the information contained herein. The author(s) may not
19 .\" have taken the same level of care in the production of this manual,
20 .\" which is licensed free of charge, as they might when working
23 .\" Formatted or processed versions of this manual, if unaccompanied by
24 .\" the source, must acknowledge the copyright and authors of this work.
26 .\" 2004-05-31, added tgkill, ahu, aeb
27 .\" 2008-01-15 mtk -- rewote DESCRIPTION
29 .TH TKILL 2 2011-09-18 "Linux" "Linux Programmer's Manual"
31 tkill, tgkill \- send a signal to a thread
34 .BI "int tkill(int " tid ", int " sig );
36 .BI "int tgkill(int " tgid ", int " tid ", int " sig );
42 to the thread with the thread ID
48 can only be used to send a signal to a process (i.e., thread group)
49 as a whole, and the signal will be delivered to an arbitrary
50 thread within that process.)
53 is an obsolete predecessor to
55 It only allows the target thread ID to be specified,
56 which may result in the wrong thread being signaled if a thread
57 terminates and its thread ID is recycled.
58 Avoid using this system call.
67 These are the raw system call interfaces, meant for internal
70 On success, zero is returned.
71 On error, \-1 is returned, and \fIerrno\fP
76 An invalid thread ID, thread group ID, or signal was specified.
80 For the required permissions, see
84 No process with the specified thread ID (and thread group ID) exists.
87 is supported since Linux 2.4.19 / 2.5.4.
89 was added in Linux 2.5.75.
94 are Linux-specific and should not be used
95 in programs that are intended to be portable.
97 See the description of
101 for an explanation of thread groups.
103 Glibc does not provide wrappers for these system calls; call them using
109 .BR rt_sigqueueinfo (2)