Question about implementation of Unix FD passing
thiago at kde.org
Sun Feb 10 09:41:46 PST 2013
On domingo, 10 de fevereiro de 2013 14.34.38, Georg Reinke wrote:
> However, because of the special semantics of out-of-band data on Unix
> sockets, one has to read all data in one operation as remaining data is
> discarded. That means that the buffer for the out-of-band data must big
> enough to hold the greatest number of file descriptors that can be
> possibly transferred, which is 2^32 (according to the spec), in order
> to guarantee that no data is discarded.
> While the actual size probably is much lower because of some kernel
> limit, this behaviour still seems odd to me. So my question is: Is this
> intended or have I misunderstood anything or made wrong assumptions
It's not possible to query the system to find out how many file descriptors were
passed. Since the number is most often very small, the reference
implementation passes a buffer of 1024 entries.
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 190 bytes
Desc: This is a digitally signed message part.
More information about the dbus