Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 52e87f3 commit dce1005Copy full SHA for dce1005
1 file changed
Lib/test/test_socket.py
@@ -86,6 +86,7 @@ def missing_ok(str):
86
try:
87
PORT = 50007
88
if os.fork():
89
+ # parent is server
90
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
91
s.bind(hostname, PORT)
92
s.listen(1)
@@ -115,7 +116,9 @@ def missing_ok(str):
115
116
print 'received:', data
117
conn.send(data)
118
conn.close()
119
+ os._exit(0)
120
else:
121
+ # child is client
122
time.sleep(1)
123
124
if verbose:
0 commit comments