unix.7: There is a limit on the size of the file descriptor array for SCM_RIGHTS

The limit is defined in the kernel as SCM_MAX_FD (253).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2018-07-08 10:30:32 +02:00
parent f1081bdc42
commit 8bdcf4bf81
1 changed files with 13 additions and 0 deletions

View File

@ -371,6 +371,19 @@ Send or receive a set of open file descriptors from another process.
The data portion contains an integer array of the file descriptors.
The passed file descriptors behave as though they have been created with
.BR dup (2).
.IP
The kernel constant
.BR SCM_MAX_FD
defines a limit on the number of file descriptors in the array.
Attempting to send an array larger than this limit cause
.BR sendmsg (2)
to fail with the error
.BR EINVAL .
.BR SCM_MAX_FD
has the value 253
(or 255 in kernels
.\" commit bba14de98753cb6599a2dae0e520714b2153522d
before 2.6.38).
.TP
.B SCM_CREDENTIALS
Send or receive UNIX credentials.