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,6 +84,7 @@ else: ...@@ -84,6 +84,7 @@ else:
rd, wr = os.pipe() rd, wr = os.pipe()
pid = os.fork() pid = os.fork()
if pid == 0: if pid == 0:
try:
if PROFILE: if PROFILE:
p = profile.Profile() p = profile.Profile()
p.runctx("run_server(storage, addr, rd, wr)", globals(), p.runctx("run_server(storage, addr, rd, wr)", globals(),
...@@ -91,6 +92,7 @@ else: ...@@ -91,6 +92,7 @@ else:
p.dump_stats("stats.s.%d" % os.getpid()) p.dump_stats("stats.s.%d" % os.getpid())
else: else:
run_server(storage, addr, rd, wr) run_server(storage, addr, rd, wr)
finally:
os._exit(0) os._exit(0)
else: else:
os.close(rd) os.close(rd)
......
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