Kaydet (Commit) 1d1394e6 authored tarafından Guido van Rossum's avatar Guido van Rossum

Make as sure as we can that the forked child does not return and

continue the tests.
üst ed648a25
......@@ -124,17 +124,20 @@ try:
conn.close()
os._exit(0)
else:
# child is client
time.sleep(1)
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
if verbose:
print 'child connecting'
s.connect(hostname, PORT)
msg = 'socket test'
s.send(msg)
data = s.recv(1024)
if msg <> data:
print 'parent/client mismatch'
s.close()
try:
# child is client
time.sleep(1)
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
if verbose:
print 'child connecting'
s.connect(hostname, PORT)
msg = 'socket test'
s.send(msg)
data = s.recv(1024)
if msg <> data:
print 'parent/client mismatch'
s.close()
finally:
os._exit(1)
except socket.error:
pass
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment