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.

classification
Title: socketpair does not accept AF_INET family argument [Linux]
Type: behavior Stage:
Components: Library (Lib) Versions: Python 2.6
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Cloudberry, rosslagerwall
Priority: normal Keywords:

Created on 2011-03-29 19:19 by Cloudberry, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
socketpair_runme.py.bz2 Cloudberry, 2011-03-29 19:19 Simple script reproducing the exception (on my system)
Messages (3)
msg132504 - (view) Author: (Cloudberry) Date: 2011-03-29 19:19
System where issue was reproduced is Ubuntu 10.04 32-bit with python 2.6.5

Expected behavior for socket.socketpair as per the docstring: "The arguments are the same as for socket() except the default family is AF_UNIX if defined on the platform; otherwise, the default is AF_INET."

Executing socket.socketpair() or socket.socketpair(socket.AF_UNIX) runs fine. However, executing socket.socketpair(socket.AF_INET) throws socket.error with Errno 95 "Operation not supported".

It seems either the docstring is off suggesting non-default family can be selected, or the AF_INET option is broken.
msg132509 - (view) Author: Ross Lagerwall (rosslagerwall) (Python committer) Date: 2011-03-29 19:29
It is noted in the Linux man page for socketpair:

On Linux, the only supported domain for this call is AF_UNIX (or synonymously, AF_LOCAL). (Most implementations have the same restriction.)
msg132512 - (view) Author: (Cloudberry) Date: 2011-03-29 19:39
Thank you for clarifications. Closing it as an invalid issue, as this is (not) working as expected. Apologies for the noise.
History
Date User Action Args
2022-04-11 14:57:15adminsetgithub: 55920
2011-03-29 19:39:59Cloudberrysetstatus: open -> closed
resolution: not a bug
messages: + msg132512
2011-03-29 19:29:59rosslagerwallsetnosy: + rosslagerwall
messages: + msg132509
2011-03-29 19:19:09Cloudberrycreate