diff mbox series

[29/39] pidfd_getfd.2: Use syscall(SYS_...); for system calls without a wrapper

Message ID 20210510175546.28445-30-alx.manpages@gmail.com
State New
Headers show
Series man2: SYNOPSIS: Fix headers, use syscall(), and other fixes | expand

Commit Message

Alejandro Colomar May 10, 2021, 5:55 p.m. UTC
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
 man2/pidfd_getfd.2 | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/man2/pidfd_getfd.2 b/man2/pidfd_getfd.2
index a4bf5bfa1..71d7ae4db 100644
--- a/man2/pidfd_getfd.2
+++ b/man2/pidfd_getfd.2
@@ -27,11 +27,18 @@ 
 pidfd_getfd \- obtain a duplicate of another process's file descriptor
 .SH SYNOPSIS
 .nf
-.BI "int pidfd_getfd(int " pidfd ", int " targetfd ", unsigned int " flags );
+.BR "#include <sys/syscall.h>" "      /* Definition of " SYS_* " constants */"
+.B #include <unistd.h>
+.PP
+.BI "int syscall(SYS_pidfd_getfd, int " pidfd ", int " targetfd ,
+.BI "            unsigned int " flags );
 .fi
 .PP
 .IR Note :
-There is no glibc wrapper for this system call; see NOTES.
+glibc provides no wrapper for
+.BR pidfd_getfd (),
+necessitating the use of
+.BR syscall (2).
 .SH DESCRIPTION
 The
 .BR pidfd_getfd ()
@@ -121,9 +128,6 @@  first appeared in Linux 5.6.
 .BR pidfd_getfd ()
 is Linux specific.
 .SH NOTES
-Glibc does not provide a wrapper for this system call; call it using
-.BR syscall (2).
-.PP
 For a description of PID file descriptors, see
 .BR pidfd_open (2).
 .PP