aboutsummaryrefslogtreecommitdiffstats
path: root/man7/unix.7
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2018-07-15 09:53:35 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2018-07-15 10:16:49 +0200
commit4564dd1feee2118e34849a4f8530b75ceb96a78a (patch)
tree673257b5aa72912306643c398f07b0af58cb52e8 /man7/unix.7
parentb65f4c691de809da7d822f11301c01188a98f835 (diff)
downloadman-pages-4564dd1feee2118e34849a4f8530b75ceb96a78a.tar.gz
unix.7: If the buffer to receive SCM_RIGHTS FDs is too small, FDs are closed
If the ancillary data buffer for receiving SCM_RIGHTS file descriptors is too small, then the excess file descriptors are automatically closed in the receiving process. Verified by experiment. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man7/unix.7')
-rw-r--r--man7/unix.76
1 files changed, 6 insertions, 0 deletions
diff --git a/man7/unix.7 b/man7/unix.7
index f03e7bd120..17a10d3db0 100644
--- a/man7/unix.7
+++ b/man7/unix.7
@@ -381,6 +381,12 @@ Semantically, this operation is equivalent to duplicating
.RB ( dup (2))
a file descriptor into the file descriptor table of another process.
.IP
+If the buffer used to receive the ancillary data containing
+file descriptors is too small (or is absent),
+then the ancillary data is truncated (or discarded)
+and the excess file descriptors are automatically closed
+in the receiving process.
+.IP
The kernel constant
.BR SCM_MAX_FD
defines a limit on the number of file descriptors in the array.