diff --git a/man2/pidfd_getfd.2 b/man2/pidfd_getfd.2 index 3fc9c441b..bb771b076 100644 --- a/man2/pidfd_getfd.2 +++ b/man2/pidfd_getfd.2 @@ -116,6 +116,32 @@ Currently, there is no glibc wrapper for this system call; call it using .PP For a description of PID file descriptors, see .BR pidfd_open (2). +.PP +The effect of +.BR pidfd_getfd () +is similar to the use of +.BR SCM_RIGHTS +messages described in +.BR unix (7), +but differs in the following respects: +.IP \(bu 2 +In order to pass a file descriptor using an +.BR SCM_RIGHTS +message, +the two processes must first establish a UNIX domain socket connection. +.IP \(bu +The use of +.BR SCM_RIGHTS +requires cooperation on the part of the process whose +file descriptor is being copied. +By contrast, no such cooperation is necessary when using +.BR pidfd_getfd (). +.IP \(bu +The ability to use +.BR pidfd_getfd () +is restricted by a +.BR PTRACE_MODE_ATTACH_REALCREDS +ptrace access mode check. .SH SEE ALSO .BR clone3 (2), .BR dup (2),