1
.\" Hey Emacs! This file is -*- nroff -*- source.
3
1
.\" Copyright (C) 2008 Michael Kerrisk <tmk.manpages@gmail.com>
4
2
.\" and Copyright 2003 Abhijit Menon-Sen <ams@wiw.org>
4
.\" %%%LICENSE_START(VERBATIM)
6
5
.\" Permission is granted to make and distribute verbatim copies of this
7
6
.\" manual provided the copyright notice and this permission notice are
8
7
.\" preserved on all copies.
23
22
.\" Formatted or processed versions of this manual, if unaccompanied by
24
23
.\" the source, must acknowledge the copyright and authors of this work.
26
26
.\" 2004-05-31, added tgkill, ahu, aeb
27
.\" 2008-01-15 mtk -- rewote DESCRIPTION
27
.\" 2008-01-15 mtk -- rewrote DESCRIPTION
29
29
.TH TKILL 2 2012-07-13 "Linux" "Linux Programmer's Manual"
51
can only be used to send a signal to a process (i.e., thread group)
51
can be used to send a signal only to a process (i.e., thread group)
52
52
as a whole, and the signal will be delivered to an arbitrary
53
53
thread within that process.)
56
56
is an obsolete predecessor to
58
It only allows the target thread ID to be specified,
58
It allows only the target thread ID to be specified,
59
59
which may result in the wrong thread being signaled if a thread
60
60
terminates and its thread ID is recycled.
61
61
Avoid using this system call.
62
.\" FIXME: Maybe say something about the following:
63
.\" http://sourceware.org/bugzilla/show_bug.cgi?id=12889
64
.\" Rich Felker <bugdal@aerifal.cx>
65
.\" There is a race condition in pthread_kill: it is possible that,
66
.\" between the time pthread_kill reads the pid/tid from the target
67
.\" thread descriptor and the time it makes the tgkill syscall,
68
.\" the target thread terminates and the same tid gets assigned
69
.\" to a new thread in the same process.
71
.\" (The tgkill syscall was designed to eliminate a similar race
72
.\" condition in tkill, but it only succeeded in eliminating races
73
.\" where the tid gets reused in a different process, and does not
74
.\" help if the same tid gets assigned to a new thread in the
77
.\" The only solution I can see is to introduce a mutex that ensures
78
.\" that a thread cannot exit while pthread_kill is being called on it.
80
.\" Note that in most real-world situations, like almost all race
81
.\" conditions, this one will be extremely rare. To make it
82
.\" measurable, one could exhaust all but 1-2 available pid values,
83
.\" possibly by lowering the max pid parameter in /proc, forcing
84
.\" the same tid to be reused rapidly.
70
93
These are the raw system call interfaces, meant for internal
71
94
thread library use.
73
96
On success, zero is returned.
74
97
On error, \-1 is returned, and \fIerrno\fP
75
98
is set appropriately.
106
129
Glibc does not provide wrappers for these system calls; call them using
112
135
.BR rt_sigqueueinfo (2)
114
This page is part of release 3.44 of the Linux
137
This page is part of release 3.51 of the Linux
117
140
A description of the project,