[Zodb-checkins] CVS: ZEO/ZEO/tests - forker.py:1.13
Jeremy Hylton
jeremy@zope.com
Mon, 21 Jan 2002 15:21:17 -0500
Update of /cvs-repository/ZEO/ZEO/tests
In directory cvs.zope.org:/tmp/cvs-serv30357
Modified Files:
forker.py
Log Message:
Make sure the child process doesn't raise an exception and continue
running the rest of the tests in the child.
=== ZEO/ZEO/tests/forker.py 1.12 => 1.13 ===
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)