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 neologix, vstinner
Date 2011-09-15.06:54:38
SpamBayes Score 1.13301e-05
Marked as misclassified No
Message-id <CAH_1eM1-Qiu0tj5bcga6pW0d6vfA7YtjHU2BF0M2=igUtSSk9A@mail.gmail.com>
In-reply-to <201109142352.12695.victor.stinner@haypocalc.com>
Content
> I don't think that it's a problem to remove private functions.
>

Alright.

> Is it mandatory to send a non-empty message (first argument for sendmsg, b'x'
> in your patch)? The original C function sends a random byte :-)
>

Some implementation can return EINVAL if no data is sent (i.e. you
can't send only ancillary data).

> multiprocessing_recvfd() contains cmsg_level=SOL_SOCKET and
> cmsg_type=SCM_RIGHTS, your Python function doesn't check cmsg_level or
> cmsg_type. Should it be checked?
>

Yes, it should be checked, I'll update the patch.

> I don't know sendmsg/recvmsg API. Do they guarantee to send/receive all data?
>

For data no, but ancillary data, yes. The only thing that could go
wrong would be a buffer too short to hold the ancillary data, but:
- the buffer size is computed with CMSG_DATA(), so it should be enough
- if the ancillay data is truncated, struct.unpack will raise an exception
History
Date User Action Args
2011-09-15 06:54:39neologixsetrecipients: + neologix, vstinner
2011-09-15 06:54:38neologixlinkissue12981 messages
2011-09-15 06:54:38neologixcreate