[issue5879] multiprocessing - example "pool of http servers " fails on windows "socket has no attribute fromfd"
Harald Armin Massa
report at bugs.python.org
Wed Apr 29 17:38:02 CEST 2009
New submission from Harald Armin Massa <chef at ghum.de>:
the example from
# Example where a pool of http servers share a single listening socket
does not work on windows.
s = socket.fromfd(fd, family, type_, proto)
in line 156 of reduction.py
fails, because fromfd is not available on windows. Sad thing:
reduction.py was put into processing.py exactly to solve that problem
(i.e. reduction.py is provided as workaround for socket.fromfd not
available on windows, from the documentation:
if sys.platform == 'win32':
# make sockets pickable/inheritable
the solution within processing was:
fromfd = socket.fromfd
def fromfd(fd, family, type, proto=0):
s = socket._socket.socket()
_processing.changeFd(s, fd, family, type, proto)
but: _multiprocessing has no longer a method changeFd.
components: Library (Lib)
title: multiprocessing - example "pool of http servers " fails on windows "socket has no attribute fromfd"
versions: Python 2.6
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list