STINNER Victor added the comment:
Extract of the POSIX standard for recvmsg():
http://pubs.opengroup.org/onlinepubs/009695399/functions/recvmsg.html
"""
DESCRIPTION
(...) The recvmsg() function shall return the total length of the message.
(...) If a message is too long to fit in the supplied buffers, and MSG_PEEK is
not set in the flags argument, the excess bytes shall be discarded, and
MSG_TRUNC shall be set in the msg_flags member of the msghdr structure. (...)
ERRORS
[EMSGSIZE] The msg_iovlen member of the msghdr structure pointed to by message
is less than or equal to 0, or is greater than {IOV_MAX}.
"""
I don't see EMSGSIZE in the Linux manual page of recvmsg(). So it looks like
Linux truncates, whereas OpenBSD raises an error. It's probably safe to accept
in the unit test that the OS can raise OSError(EMSGSIZE).
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue20669>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com