diff options
author | Barry Warsaw <barry@python.org> | 1997-01-07 21:02:06 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 1997-01-07 21:02:06 (GMT) |
commit | dce1005908c197d5887692c73a5364e3c426412e (patch) | |
tree | 031db3b2df087c94255690679c67144d66e987df /Lib/test/test_socket.py | |
parent | 52e87f377311464ac29a1ab7f7b582642bdb6452 (diff) | |
download | cpython-dce1005908c197d5887692c73a5364e3c426412e.zip cpython-dce1005908c197d5887692c73a5364e3c426412e.tar.gz cpython-dce1005908c197d5887692c73a5364e3c426412e.tar.bz2 |
Added an os._exit(0) in the parent so we don't have two test processes
after test_socket.py is run!
Diffstat (limited to 'Lib/test/test_socket.py')
-rw-r--r-- | Lib/test/test_socket.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 6b45383..2b3c504 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: |