'\" t .\" Title: sys_tgkill .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: May 2018 .\" Manual: Driver Basics .\" Source: Kernel Hackers Manual 3.16.56 .\" Language: English .\" .TH "SYS_TGKILL" "9" "May 2018" "Kernel Hackers Manual 3\&.16\&" "Driver Basics" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" sys_tgkill \- send signal to one specific thread .SH "SYNOPSIS" .HP \w'long\ sys_tgkill('u .BI "long sys_tgkill(pid_t\ " "tgid" ", pid_t\ " "pid" ", int\ " "sig" ");" .SH "ARGUMENTS" .PP \fItgid\fR .RS 4 the thread group ID of the thread .RE .PP \fIpid\fR .RS 4 the PID of the thread .RE .PP \fIsig\fR .RS 4 signal to be sent .RE .SH "DESCRIPTION" .PP This syscall also checks the \fItgid\fR and returns \-ESRCH even if the PID exists but it\*(Aqs not belonging to the target process anymore\&. This method solves the problem of threads exiting and PIDs getting reused\&. .SH "COPYRIGHT" .br