.\" -*- coding: UTF-8 -*- .\" Copyright (C) 2008 Michael Kerrisk .\" and Copyright 2003 Abhijit Menon-Sen .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\" 2004-05-31, added tgkill, ahu, aeb .\" 2008-01-15 mtk -- rewrote DESCRIPTION .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH TKILL 2 "2 août 2019" Linux "Manuel du programmeur Linux" .SH NOM tkill, tgkill \- Envoyer un signal à un thread .SH SYNOPSIS .nf \fBint tkill(int \fP\fItid\fP\fB, int \fP\fIsig\fP\fB);\fP .PP \fBint tgkill(int \fP\fItgid\fP\fB, int \fP\fItid\fP\fB, int \fP\fIsig\fP\fB);\fP .fi .PP \fIRemarque\fP\ : il n'y a pas d'enveloppe de glibc pour \fBtkill\fP()\ ; consultez \fBNOTES\fP .SH DESCRIPTION \fBtgkill\fP() envoie le signal \fIsig\fP au thread qui a pour identifiant \fItid\fP dans le groupe de thread \fItgid\fP. (Contrairement à \fBkill\fP(2) qui ne peut être utilisé que pour envoyer un signal à tout un processus (c'est\-à\-dire un groupe de threads)\ ; le signal étant envoyé à n'importe quel thread du processus) .PP .\" FIXME Maybe say something about the following: .\" http://sourceware.org/bugzilla/show_bug.cgi?id=12889 .\" .\" Quoting Rich Felker : .\" .\" There is a race condition in pthread_kill: it is possible that, .\" between the time pthread_kill reads the pid/tid from the target .\" thread descriptor and the time it makes the tgkill syscall, .\" the target thread terminates and the same tid gets assigned .\" to a new thread in the same process. .\" .\" (The tgkill syscall was designed to eliminate a similar race .\" condition in tkill, but it only succeeded in eliminating races .\" where the tid gets reused in a different process, and does not .\" help if the same tid gets assigned to a new thread in the .\" same process.) .\" .\" The only solution I can see is to introduce a mutex that ensures .\" that a thread cannot exit while pthread_kill is being called on it. .\" .\" Note that in most real-world situations, like almost all race .\" conditions, this one will be extremely rare. To make it .\" measurable, one could exhaust all but 1-2 available pid values, .\" possibly by lowering the max pid parameter in /proc, forcing .\" the same tid to be reused rapidly. \fBtkill\fP() est l'ancienne version de \fBtgkill\fP() et est obsolète. Il ne permet que de préciser l'identifiant du thread cible, ce qui peut résulter en un envoi du signal au mauvais thread si le thread se termine et que son identifiant est réutilisé. Évitez d'utiliser cet appel système. .PP Ce sont des appels système bruts, conçus pour une utilisation dans la bibliothèque des threads. .SH "VALEUR RENVOYÉE" En cas de succès, zéro est renvoyé. En cas d'erreur, \fB\-1\fP est renvoyé et \fIerrno\fP reçoit une valeur adéquate. .SH ERREURS .TP \fBEAGAIN\fP La limite de ressources \fBRLIMIT_SIGPENDING\fP a été atteinte et \fIsig\fP est un signal en temps réel. .TP \fBEAGAIN\fP La mémoire disponible du noyau est insuffisante et \fIsig\fP est un signal en temps réel. .TP \fBEINVAL\fP L'identifiant de thread ou l'identifiant de groupe de threads ou le numéro de signal n'est pas valable. .TP \fBEPERM\fP Permission refusée. Pour les permissions nécessaires, consultez \fBkill\fP(2). .TP \fBESRCH\fP Il n'y a pas de processus avec le TID (et le TGID) indiqué. .SH VERSIONS \fBtkill\fP() est pris en charge depuis Linux\ 2.4.19/2.5.4. \fBtgkill\fP() a été ajouté dans Linux\ 2.5.75. .PP La prise en charge de \fBtgkill\fP() a été ajoutée dans la glibc dans la version\ 2.30. .SH CONFORMITÉ \fBtkill\fP() et \fBtgkill\fP() sont spécifiques à Linux et ne doivent pas être utilisés dans un programme conçu pour être portable. .SH NOTES Consultez la description de \fBCLONE_THREAD\fP dans \fBclone\fP(2) pour une explication sur les groupes de threads. .PP La glibc ne fournit pas d'enveloppe pour \fBtkill\fP\ ; utilisez \fBsyscall\fP(2) pour l'appeler. Avant la glibc\ 2.30, il n'y avait pas non plus de fonction d'enveloppe pour \fBtgkill\fP(). .SH "VOIR AUSSI" \fBclone\fP(2), \fBgettid\fP(2), \fBkill\fP(2), \fBrt_sigqueueinfo\fP(2) .SH COLOPHON Cette page fait partie de la publication\ 5.10 du projet \fIman\-pages\fP Linux. Une description du projet et des instructions pour signaler des anomalies et la dernière version de cette page peuvent être trouvées à l'adresse \%https://www.kernel.org/doc/man\-pages/. .PP .SH TRADUCTION La traduction française de cette page de manuel a été créée par Christophe Blaess , Stéphan Rafin , Thierry Vignaud , François Micaux, Alain Portal , Jean-Philippe Guérard , Jean-Luc Coulon (f5ibh) , Julien Cristau , Thomas Huriaux , Nicolas François , Florentin Duneau , Simon Paillard , Denis Barbier , David Prévot , Cédric Boutillier , Frédéric Hantrais et Jean-Pierre Giraud . .PP Cette traduction est une documentation libre ; veuillez vous reporter à la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License version 3 .UE concernant les conditions de copie et de distribution. Il n'y a aucune RESPONSABILITÉ LÉGALE. .PP Si vous découvrez un bogue dans la traduction de cette page de manuel, veuillez envoyer un message à .MT debian-l10n-french@lists.debian.org .ME .