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 ;
.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.
.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