From e2340cf7488c5cb19c339b62c360ec3c44c6f113 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Sat, 29 Jun 2019 22:06:10 +0200 Subject: [PATCH] unix.7: Note SCM_RIGHTS interaction with RLIMIT_NOFILE If the file descriptors received in SCM_RIGHTS would cause the process to its exceed RLIMIT_NOFILE limit, the excess FDs are discarded. Signed-off-by: Michael Kerrisk --- man7/unix.7 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/man7/unix.7 b/man7/unix.7 index f22e9c0ed..b4b60308a 100644 --- a/man7/unix.7 +++ b/man7/unix.7 @@ -452,6 +452,14 @@ then the ancillary data is truncated (or discarded) and the excess file descriptors are automatically closed in the receiving process. .IP +If the number of file descriptors received in the ancillary data would +cause the process to exceed its +.B RLIMIT_NOFILE +resource limit (see +.BR getrlimit (2)), +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.