Message184035
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)) |
|
Date |
User |
Action |
Args |
2013-03-12 17:09:36 | sbt | set | recipients:
+ sbt, terry.reedy, ezio.melotti |
2013-03-12 17:09:36 | sbt | set | messageid: <1363108176.93.0.812388537707.issue17399@psf.upfronthosting.co.za> |
2013-03-12 17:09:36 | sbt | link | issue17399 messages |
2013-03-12 17:09:36 | sbt | create | |
|