Author ghum
Recipients ghum
Date 2009-04-29.15:38:00
SpamBayes Score 2.85057e-11
Marked as misclassified No
Message-id <>
the example from

named "
# 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

fails, because fromfd is not available on windows. Sad thing: was put into exactly to solve that problem
(i.e. is provided as workaround for socket.fromfd not
available on windows, from the documentation: 
if sys.platform == 'win32':
    import multiprocessing.reduction
    # make sockets pickable/inheritable

the solution within processing was:

    fromfd = socket.fromfd
except AttributeError:
    def fromfd(fd, family, type, proto=0):
        s = socket._socket.socket()
        _processing.changeFd(s, fd, family, type, proto)
        return s

but: _multiprocessing has no longer a method changeFd.

Date User Action Args
2009-04-29 15:38:02ghumsetrecipients: + ghum
2009-04-29 15:38:02ghumsetmessageid: <>
2009-04-29 15:38:01ghumlinkissue5879 messages
2009-04-29 15:38:00ghumcreate