[Zodb-checkins] CVS: StandaloneZODB/ZEO/tests - forker.py:1.14.2.2

Jeremy Hylton jeremy@zope.com
Wed, 3 Apr 2002 18:48:01 -0500


Update of /cvs-repository/StandaloneZODB/ZEO/tests
In directory cvs.zope.org:/tmp/cvs-serv12568/tests

Modified Files:
      Tag: zeo-1_0-debug-branch
	forker.py 
Log Message:
Make sure the forker *really* exits.


=== StandaloneZODB/ZEO/tests/forker.py 1.14.2.1 => 1.14.2.2 ===
         pid = os.fork()
         if pid == 0:
-            if PROFILE:
-                p = profile.Profile()
-                p.runctx("run_server(storage, addr, rd, wr)", globals(),
-                         locals())
-                p.dump_stats("stats.s.%d" % os.getpid())
-            else:
-                run_server(storage, addr, rd, wr)
-            os._exit(0)
+            try:
+                if PROFILE:
+                    p = profile.Profile()
+                    p.runctx("run_server(storage, addr, rd, wr)", globals(),
+                             locals())
+                    p.dump_stats("stats.s.%d" % os.getpid())
+                else:
+                    run_server(storage, addr, rd, wr)
+            finally:
+                os._exit(0)
         else:
             os.close(rd)
             return pid, ZEOClientExit(wr)