[issue3321] _multiprocessing.Connection() doesn't check handle

Amaury Forgeot d'Arc report at bugs.python.org
Sat Sep 13 11:36:05 CEST 2008


Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:

Note that Windows does not crash in such cases:

>>> import socket, _multiprocessing
>>> obj = _multiprocessing.Connection(44977608)
>>> obj.poll()
IOError: [Errno 10038] An operation was attempted on something that is
not a socket

>>> s = socket.socket()
>>> obj = _multiprocessing.Connection(s.fileno())
>>> obj.poll()
False
>>> s.close()
>>> obj.poll()
IOError: [Errno 10038] An operation was attempted on something that is
not a socket


So some "#ifndef MS_WINDOWS" should be enough...

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3321>
_______________________________________


More information about the Python-bugs-list mailing list