diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:41:07 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:41:07 +0000 |
commit | 3af6d22bb3850ab2bac67287e3a3d3b0e32868e5 (patch) | |
tree | 3ee7a3ec64525911fa865bb984c86d997d855527 /man2/pidfd_open.2 | |
parent | Adding debian version 6.05.01-1. (diff) | |
download | manpages-3af6d22bb3850ab2bac67287e3a3d3b0e32868e5.tar.xz manpages-3af6d22bb3850ab2bac67287e3a3d3b0e32868e5.zip |
Merging upstream version 6.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'man2/pidfd_open.2')
-rw-r--r-- | man2/pidfd_open.2 | 16 |
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 |