]> granicus.if.org Git - python/commitdiff
Added an os._exit(0) in the parent so we don't have two test processes
authorBarry Warsaw <barry@python.org>
Tue, 7 Jan 1997 21:02:06 +0000 (21:02 +0000)
committerBarry Warsaw <barry@python.org>
Tue, 7 Jan 1997 21:02:06 +0000 (21:02 +0000)
after test_socket.py is run!

Lib/test/test_socket.py

index 6b45383ec4985f948ba8ead8c8b94afa9a3e3627..2b3c504984378d78a13458a8a7e5771abc441f7a 100644 (file)
@@ -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: