[Zodb-checkins] CVS: StandaloneZODB/ZEO/tests - multi.py:1.5
Guido van Rossum
guido@python.org
Mon, 21 Jan 2002 15:36:39 -0500
Update of /cvs-repository/StandaloneZODB/ZEO/tests
In directory cvs.zope.org:/tmp/cvs-serv1615
Modified Files:
multi.py
Log Message:
Make sure the child process doesn't raise an exception and continue
running the rest of the tests in the child.
=== StandaloneZODB/ZEO/tests/multi.py 1.4 => 1.5 ===
pid = os.fork()
if pid == 0:
- import ZEO.ClientStorage
- if VERBOSE:
- print "Client process started:", os.getpid()
- cli = ZEO.ClientStorage.ClientStorage(addr, client=CLIENT_CACHE)
- if client_func is None:
- run(cli)
- else:
- client_func(cli)
- cli.close()
- os._exit(0)
+ try:
+ import ZEO.ClientStorage
+ if VERBOSE:
+ print "Client process started:", os.getpid()
+ cli = ZEO.ClientStorage.ClientStorage(addr, client=CLIENT_CACHE)
+ if client_func is None:
+ run(cli)
+ else:
+ client_func(cli)
+ cli.close()
+ finally:
+ os._exit(0)
else:
return pid