Author sbt
Recipients ezio.melotti, sbt, terry.reedy
Date 2013-03-12.17:09:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1363108176.93.0.812388537707.issue17399@psf.upfronthosting.co.za>
In-reply-to
Content
Could you try the following program:

import socket
import multiprocessing
import multiprocessing.reduction
import multiprocessing.connection

def socketpair():
    with socket.socket() as l:
        l.bind(('localhost', 0))
        l.listen(1)
        s = socket.socket()
        s.connect(l.getsockname())
        a, _ = l.accept()
        return s, a

def bar(s):
    print(s)
    s.sendall(b'from bar')

if __name__ == '__main__':
    a, b = socketpair()
    p = multiprocessing.Process(target=bar, args=(b,))
    p.start()
    b.close()
    print(a.recv(100))
History
Date User Action Args
2013-03-12 17:09:36sbtsetrecipients: + sbt, terry.reedy, ezio.melotti
2013-03-12 17:09:36sbtsetmessageid: <1363108176.93.0.812388537707.issue17399@psf.upfronthosting.co.za>
2013-03-12 17:09:36sbtlinkissue17399 messages
2013-03-12 17:09:36sbtcreate