On Wed, Apr 15, 2015 at 11:21 AM, William Orr <w...@worrbase.com> wrote: > On 4/15/15 5:37 AM, Otto Moerbeek wrote: >> On Wed, Apr 15, 2015 at 11:32:11AM +0200, Mark Kettenis wrote: >> >>>> Date: Tue, 14 Apr 2015 21:26:25 -0400 >>>> From: William Orr <w...@worrbase.com> ... >>>> Is this behavior intentional, and the documentation is missing this >>>> failure mode? Or is the behavior unintentional? I'm happy to submit a >>>> patch for either, I just want to know which behavior is intended. >>> >>> The behaviour is intentional. The additional complexity of supporting >>> multiple cmsghdrs has caused many bugs (and associated security >>> issues) in the past. The alignment fuckups in various OSes make it >>> hard to use this functionality in a portable way anyway. And we only >>> support SCM_RIGHTS, so there is no real reason to use multiple >>> cmsghdrs in your code. >> >> Plus it *is* possible to send multiple fd's in one message. > > Yeah, I was wondering why this was allowed on some OSes in the first > place, since it seems redundant. > > Once I'm not in an airport, I'll submit a docs patch just so that it's > clear. > > re: CPython's test suite, I have a patch in the queue that only enables > this behavior on Linux.
If CPython exposes the raw C APIs, then it would be good to patch their docs too, to indicate that multiple fds should be passed in one cmsg and not as separate cmsgs... Philip Guenther