* Does SCM_RIGHTS limit on fd array apply to a particular cmsghdr or the whole ancillary data?
@ 2020-12-09 19:23 Wolfgang Draxinger
0 siblings, 0 replies; only message in thread
From: Wolfgang Draxinger @ 2020-12-09 19:23 UTC (permalink / raw)
To: LKML Mailing List
Hi,
in the documentation on SCM_RIGHTS the maximum number of file
descriptors that can be passed is described as (release 5.09 of the
Linux man-pages project):
| SCM_RIGHTS
| Send or receive a set of open file descriptors from another
| process. The data portion contains an integer array of the file
| descriptors.
| (...)
| The kernel constant SCM_MAX_FD defines a limit on the number of
| file descriptors in the array. Attempting to send an array
| larger than this limit causes sendmsg(2) to fail with
the error | EINVAL.
In my reading this might be interpreted as SCM_MAX_FD per SCM_RIGHTS
cmsghdr, xor SCM_MAX_FD per sendmsg. It would be good to know, which one
it is. So which is the proper strategy if I have to pass more than
SCM_MAX_FD file descriptors between processes?
Cheers,
Wolfgang
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-09 19:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-09 19:23 Does SCM_RIGHTS limit on fd array apply to a particular cmsghdr or the whole ancillary data? Wolfgang Draxinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).