aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2016-12-16 11:32:05 +0100
committerMichael Kerrisk <mtk.manpages@gmail.com>2016-12-17 10:33:55 +0100
commitdc4eea68b5652e54a979d346a961971a9957f41b (patch)
tree16ec72f6b8a8e08b117f8e679ac01244639f7ca6
parent7df57849a5225fdbb6f883e0181372e856939808 (diff)
downloadman-pages-dc4eea68b5652e54a979d346a961971a9957f41b.tar.gz
unix.7: Document ETOOMANYREFS for SCM_RIGHTS send exceeding RLIMIT_NOFILE limit
Reviewed-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r--man7/unix.727
1 files changed, 27 insertions, 0 deletions
diff --git a/man7/unix.7 b/man7/unix.7
index 05681f0319..3f41ad4ccd 100644
--- a/man7/unix.7
+++ b/man7/unix.7
@@ -534,6 +534,33 @@ versus
.TP
.B ESOCKTNOSUPPORT
Unknown socket type.
+.TP
+.B ETOOMANYREFS
+This error can occur for
+.BR sendmsg (2)
+when sending a file descriptor as ancilary data over
+a UNIX domain socket (see the description of
+.BR SCM_RIGHTS ,
+above).
+It occurs if the number of "in-flight" file descriptors exceeds the
+.B RLIMIT_NOFILE
+resource limit and the caller does not have the
+.BR CAP_SYS_RESOURCE
+capability.
+An in-flight file descriptor is one that has been sent using
+.BR sendmsg (2)
+but has not yet been accepted in the recipient process using
+.BR recvmsg (2).
+
+This error is diagnosed since Linux 4.5.
+.\" commit 712f4aad406bb1ed67f3f98d04c044191f0ff593
+In earlier kernel versions,
+it was possible to place an unlimited number of file descriptors in flight,
+by sending each file descriptor with
+.BR sendmsg (2)
+and then closing the file descriptor so that it was not accounted against the
+.B RLIMIT_NOFILE
+resource limit.
.PP
Other errors can be generated by the generic socket layer or
by the filesystem while generating a filesystem socket object.