diff options
| author | Alejandro Colomar <alx.manpages@gmail.com> | 2021-06-12 10:31:35 +0200 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2021-06-20 14:43:43 +1200 |
| commit | d96a43d419f00e9e4cb1556e79ae86e126ce9dbf (patch) | |
| tree | 4dff554013f906589c64fc1c784d0a2e45552977 /man2/tkill.2 | |
| parent | 9a52fd2eec2c7139d04bc75f781c54d04953df64 (diff) | |
| download | man-pages-d96a43d419f00e9e4cb1556e79ae86e126ce9dbf.tar.gz | |
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>
Diffstat (limited to 'man2/tkill.2')
| -rw-r--r-- | man2/tkill.2 | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/man2/tkill.2 b/man2/tkill.2 index a6752591be..6ff930e17d 100644 --- a/man2/tkill.2 +++ b/man2/tkill.2 @@ -31,14 +31,22 @@ tkill, tgkill \- send a signal to a thread .SH SYNOPSIS .nf -.BI "int tkill(pid_t " tid ", int " sig ); -.BI "int tgkill(pid_t " tgid ", pid_t " tid ", int " sig ); +.BR "#include <signal.h>" " /* Definition of " SIG* " constants */" +.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 .PP .IR Note : -There is no glibc wrapper for -.BR tkill (); -see NOTES. +glibc provides no wrapper for +.BR tkill (), +necessitating the use of +.BR syscall (2). .SH DESCRIPTION .BR tgkill () sends the signal @@ -138,10 +146,6 @@ in .BR clone (2) for an explanation of thread groups. .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 .BR tgkill (). .SH SEE ALSO |
