mirror of https://github.com/mkerrisk/man-pages
tkill.2: Use syscall(SYS_...); for system calls without a wrapper; fix includes too
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
9a52fd2eec
commit
d96a43d419
22
man2/tkill.2
22
man2/tkill.2
|
@ -31,14 +31,22 @@
|
||||||
tkill, tgkill \- send a signal to a thread
|
tkill, tgkill \- send a signal to a thread
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.nf
|
.nf
|
||||||
.BI "int tkill(pid_t " tid ", int " sig );
|
.BR "#include <signal.h>" " /* Definition of " SIG* " constants */"
|
||||||
.BI "int tgkill(pid_t " tgid ", pid_t " tid ", int " sig );
|
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
|
||||||
|
.B #include <unistd.h>
|
||||||
|
.PP
|
||||||
|
.BI "int syscall(SYS_tkill, pid_t " tid ", int " sig );
|
||||||
|
.PP
|
||||||
|
.B #include <signal.h>
|
||||||
|
.PP
|
||||||
|
.BI "int tgkill, pid_t " tgid ", pid_t " tid ", int " sig );
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
.IR Note :
|
.IR Note :
|
||||||
There is no glibc wrapper for
|
glibc provides no wrapper for
|
||||||
.BR tkill ();
|
.BR tkill (),
|
||||||
see NOTES.
|
necessitating the use of
|
||||||
|
.BR syscall (2).
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.BR tgkill ()
|
.BR tgkill ()
|
||||||
sends the signal
|
sends the signal
|
||||||
|
@ -138,10 +146,6 @@ in
|
||||||
.BR clone (2)
|
.BR clone (2)
|
||||||
for an explanation of thread groups.
|
for an explanation of thread groups.
|
||||||
.PP
|
.PP
|
||||||
Glibc does not provide a wrapper for
|
|
||||||
.BR tkill ();
|
|
||||||
call it using
|
|
||||||
.BR syscall (2).
|
|
||||||
Before glibc 2.30, there was also no wrapper function for
|
Before glibc 2.30, there was also no wrapper function for
|
||||||
.BR tgkill ().
|
.BR tgkill ().
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
|
|
Loading…
Reference in New Issue