Commit 2df33580 authored by Jeremy Hylton's avatar Jeremy Hylton

Make sure the child process doesn't raise an exception and continue

running the rest of the tests in the child.
parent e0678d6c
......@@ -84,14 +84,16 @@ else:
rd, wr = os.pipe()
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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment