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 <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2019-06-29 22:06:10 +02:00
parent 1d03bca07f
commit e2340cf748
1 changed files with 8 additions and 0 deletions

View File

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