.\" -*- coding: UTF-8 -*- .\" Copyright 2003, Abhijit Menon-Sen .\" Copyright 2008, Michael Kerrisk .\" Copyright, the authors of the Linux man-pages project .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH tkill 2 "8. februar 2026" "Linux man\-pages 6.17" .SH NAVN tkill, tgkill \- send et signal til en tråd .SH BIBLIOTEK Standard C library (\fIlibc\fP,\ \fI\-lc\fP) .SH SYNOPSIS .nf \fB#include \fP /* Definition of \fBSIG*\fP constants */ \fB#include \fP /* Definition of \fBSYS_*\fP constants */ \fB#include \fP .P \fB[[deprecated]] int syscall(SYS_tkill, pid_t \fP\fItid\fP\fB, int \fP\fIsig\fP\fB);\fP .P \fB#include \fP .P \fBint tgkill(pid_t \fP\fItgid\fP\fB, pid_t \fP\fItid\fP\fB, int \fP\fIsig\fP\fB);\fP .fi .P \fIBemærk\fP: glibc tilbyder intet omslag for \fBtkill\fP(), hvilket kræver brug af \fBsyscall\fP(2). .SH BESKRIVELSE \fBtgkill\fP() sender signalet \fIsig\fP til tråden med tråd\-id'et \fItid\fP i trådgruppen \fItgid\fP. (Som kontrast kan \fBkill\fP(2) bruges til at sende et signal kun til en proces (dvs. trådgruppe) som en helhed og signalet vil blive leveret til en arbitrær tråd i den proces). .P .\" 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() er en forældet forgænger til \fBtgkill\fP(). Tillader kun at måltråd\-id'et angives, hvilket kan medføre at den forkerte tråd bliver signaleret hvis en tråd afslutter og dens tråd\-id genbruges. Undgå at bruge dette systemkald. .P Dette er de rå systemkaldgrænseflader, lavet for intern trådbiblioteksbrug. .SH RETURVÆRDI Ved succes returneres nul. Ved fejl returneres \-1 og \fIerrno\fP angives for at indikere fejlen. .SH FEJL .TP \fBEAGAIN\fP Ressourcebegrænsningen The \fBRLIMIT_SIGPENDING\fP blev nået og \fIsig\fP er et realtids signal. .TP \fBEAGAIN\fP Utilstrækkelig kernehukommelse var tilgængelig og \fIsig\fP er et realtids signal. .TP \fBEINVAL\fP Et ugyldigt tråd\-id, trådgruppe\-id eller signal blev angivet. .TP \fBEPERM\fP Tilladelse nægtet. For de krævede tilladelser, se \fBkill\fP(2). .TP \fBESRCH\fP Ingen proces med det angivet tråd\-id (og trådgruppe\-id) findes. .SH STANDARDER Linux. .SH HISTORIK .TP \fBtkill\fP() Linux 2.4.19 / 2.5.4. .TP \fBtgkill\fP() Linux 2.5.75, glibc 2.30. .SH NOTER Se beskrivelsen af \fBCLONE_THREAD\fP i \fBclone\fP(2) for en forklaring af trådgrupper. .SH "SE OGSÅ" \fBclone\fP(2), \fBgettid\fP(2), \fBkill\fP(2), \fBrt_sigqueueinfo\fP(2) .PP .SH OVERSÆTTELSE Oversættere af denne manual til dansk Joe Hansen . .PP Denne oversættelse er gratis dokumentation; læs .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License version 3 .UE eller nyere for ophavsretbetingelser. Der er INGEN ANSVAR. .PP Hvis du støder på fejl i oversættelsen af ​​denne vejledning, skal du sende en besked til .MT debian-l10n-danish@lists.debian.org .ME .