From: Barry Warsaw Date: Tue, 7 Jan 1997 21:02:06 +0000 (+0000) Subject: Added an os._exit(0) in the parent so we don't have two test processes X-Git-Tag: v1.5a1~562 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dce1005908c197d5887692c73a5364e3c426412e;p=python Added an os._exit(0) in the parent so we don't have two test processes after test_socket.py is run! --- diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 6b45383ec4..2b3c504984 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -86,6 +86,7 @@ except socket.error: try: PORT = 50007 if os.fork(): + # parent is server s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind(hostname, PORT) s.listen(1) @@ -115,7 +116,9 @@ try: print 'received:', data conn.send(data) conn.close() + os._exit(0) else: + # child is client time.sleep(1) s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) if verbose: