summaryrefslogtreecommitdiffstats
path: root/man2/pidfd_getfd.2
diff options
context:
space:
mode:
Diffstat (limited to 'man2/pidfd_getfd.2')
-rw-r--r--man2/pidfd_getfd.216
1 files changed, 8 insertions, 8 deletions
diff --git a/man2/pidfd_getfd.2 b/man2/pidfd_getfd.2
index 9e3af2a..918f1d2 100644
--- a/man2/pidfd_getfd.2
+++ b/man2/pidfd_getfd.2
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pidfd_getfd 2 2023-03-30 "Linux man-pages 6.05.01"
+.TH pidfd_getfd 2 2023-10-31 "Linux man-pages 6.7"
.SH NAME
pidfd_getfd \- obtain a duplicate of another process's file descriptor
.SH LIBRARY
@@ -12,11 +12,11 @@ Standard C library
.nf
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
.B #include <unistd.h>
-.PP
+.P
.BI "int syscall(SYS_pidfd_getfd, int " pidfd ", int " targetfd ,
.BI " unsigned int " flags );
.fi
-.PP
+.P
.IR Note :
glibc provides no wrapper for
.BR pidfd_getfd (),
@@ -30,7 +30,7 @@ This new file descriptor is a duplicate of an existing file descriptor,
.IR targetfd ,
in the process referred to by the PID file descriptor
.IR pidfd .
-.PP
+.P
The duplicate file descriptor refers to the same open file description (see
.BR open (2))
as the original file descriptor in the process referred to by
@@ -40,19 +40,19 @@ Furthermore, operations on the underlying file object
(for example, assigning an address to a socket object using
.BR bind (2))
can equally be performed via the duplicate file descriptor.
-.PP
+.P
The close-on-exec flag
.RB ( FD_CLOEXEC ;
see
.BR fcntl (2))
is set on the file descriptor returned by
.BR pidfd_getfd ().
-.PP
+.P
The
.I flags
argument is reserved for future use.
Currently, it must be specified as 0.
-.PP
+.P
Permission to duplicate another process's file descriptor
is governed by a ptrace access mode
.B PTRACE_MODE_ATTACH_REALCREDS
@@ -111,7 +111,7 @@ Linux 5.6.
.SH NOTES
For a description of PID file descriptors, see
.BR pidfd_open (2).
-.PP
+.P
The effect of
.BR pidfd_getfd ()
is similar to the use of