Commit 62cbc8a2 authored by Guido van Rossum's avatar Guido van Rossum

Make sure that a forked child process exits even if it raises an exception.

parent 933520b5
......@@ -735,9 +735,11 @@ class _TestMboxMMDF(TestMailbox):
pid = os.fork()
if pid == 0:
# In the child, lock the mailbox.
try:
self._box.lock()
time.sleep(2)
self._box.unlock()
finally:
os._exit(0)
# In the parent, sleep a bit to give the child time to acquire
......
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