]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
pidfd_getfd.2: Additions and fixes after review by Christian Brauner
authorMichael Kerrisk <mtk.manpages@gmail.com>
Wed, 8 Apr 2020 08:27:32 +0000 (10:27 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Fri, 10 Apr 2020 08:14:29 +0000 (10:14 +0200)
Reported-by: Christian Brauner <christian@brauner.io>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man2/pidfd_getfd.2

index bb771b07662a58e1112d0abac85fcf3f10e4c447..b9baeae3569548f83267ff9ba6188a8aa33dd2f8 100644 (file)
@@ -46,7 +46,7 @@ The two file descriptors thus share file status flags and file offset.
 Furthermore, operations on the underlying file object
 (for example, assigning an address to a socket object using
 .BR bind (2))
-can be equally be performed via the duplicate file descriptor.
+can equally be performed via the duplicate file descriptor.
 .PP
 The close-on-exec flag
 .RB ( FD_CLOEXEC ;
@@ -68,7 +68,7 @@ check (see
 .SH RETURN VALUE
 On success,
 .BR pidfd_getfd ()
-returns a nonnegative file descriptor.
+returns a file descriptor (a nonnegative integer).
 On error, \-1 is returned and
 .I errno
 is set to indicate the cause of the error.
@@ -98,6 +98,14 @@ in
 .B ENFILE
 The system-wide limit on the total number of open files has been reached.
 .TP
+.B EPERM
+The calling process did not have
+.B PTRACE_MODE_ATTACH_REALCREDS
+permissions (see
+.BR ptrace (2))
+over the process referred to by
+.IR pidfd .
+.TP
 .B ESRCH
 The process referred to by
 .I pidfd