summaryrefslogtreecommitdiffstats
path: root/man2/pidfd_open.2
diff options
context:
space:
mode:
Diffstat (limited to 'man2/pidfd_open.2')
-rw-r--r--man2/pidfd_open.216
1 files changed, 8 insertions, 8 deletions
diff --git a/man2/pidfd_open.2 b/man2/pidfd_open.2
index 8321e82..32e92c0 100644
--- a/man2/pidfd_open.2
+++ b/man2/pidfd_open.2
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pidfd_open 2 2023-05-03 "Linux man-pages 6.05.01"
+.TH pidfd_open 2 2023-10-31 "Linux man-pages 6.7"
.SH NAME
pidfd_open \- obtain a file descriptor that refers to a process
.SH LIBRARY
@@ -12,10 +12,10 @@ Standard C library
.nf
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
.B #include <unistd.h>
-.PP
+.P
.BI "int syscall(SYS_pidfd_open, pid_t " pid ", unsigned int " flags );
.fi
-.PP
+.P
.IR Note :
glibc provides no wrapper for
.BR pidfd_open (),
@@ -29,7 +29,7 @@ the process whose PID is specified in
.IR pid .
The file descriptor is returned as the function result;
the close-on-exec flag is set on the file descriptor.
-.PP
+.P
The
.I flags
argument either has the value 0, or contains the following flag:
@@ -88,7 +88,7 @@ Linux 5.3.
The following code sequence can be used to obtain a file descriptor
for the child of
.BR fork (2):
-.PP
+.P
.in +4n
.EX
pid = fork();
@@ -98,7 +98,7 @@ if (pid > 0) { /* If parent */
}
.EE
.in
-.PP
+.P
Even if the child has already terminated by the time of the
.BR pidfd_open ()
call, its PID will not have been recycled and the returned
@@ -127,7 +127,7 @@ the zombie process was not reaped elsewhere in the program
(e.g., either by an asynchronously executed signal handler or by
.BR wait (2)
or similar in another thread).
-.PP
+.P
If any of these conditions does not hold,
then the child process (along with a PID file descriptor that refers to it)
should instead be created using
@@ -181,7 +181,7 @@ A PID file descriptor can be used as the argument of
.BR process_madvise (2)
in order to provide advice on the memory usage patterns of the process
referred to by the file descriptor.
-.PP
+.P
The
.BR pidfd_open ()
system call is the preferred way of obtaining a PID file descriptor