This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author neologix
Recipients baikie, neologix, vstinner
Date 2011-09-18.21:11:39
SpamBayes Score 1.09473e-07
Marked as misclassified No
Message-id <>
> I had a look at this patch, and the FD passing looked OK, except
> that calculating the buffer size with CMSG_SPACE() may allow more
> than one file descriptor to be received, with the extra one going
> unnoticed - it should use CMSG_LEN() instead

Thanks for catching this.
Here's an updated patch.

> (the existing C implementation has the same problem, I see).

I just checked, and the C version uses CMSG_SPACE() as the buffer size, but passes CMSG_LEN() to cmsg->cmsg_len and msg.msg_controllen. Or am I missing something?
Date User Action Args
2011-09-18 21:11:40neologixsetrecipients: + neologix, vstinner, baikie
2011-09-18 21:11:40neologixsetmessageid: <>
2011-09-18 21:11:40neologixlinkissue12981 messages
2011-09-18 21:11:40neologixcreate