[Zodb-checkins] CVS: Packages/ZEO - start.py:1.20
Jim Fulton
jim@digicool.com
Sun, 1 Apr 2001 15:11:55 -0400 (EDT)
Update of /cvs-repository/Packages/ZEO
In directory korak:/tmp/cvs-serv24265
Modified Files:
start.py
Log Message:
Added some extra exception handlers to, hopefully, ease running on
Windows.
--- Updated File start.py in package Packages/ZEO --
--- start.py 2001/04/01 18:38:34 1.19
+++ start.py 2001/04/01 19:11:53 1.20
@@ -296,7 +296,8 @@
signal.signal(signal.SIGINT,
lambda sig, frame, s=storages: shutdown(s, 0)
)
- signal.signal(signal.SIGHUP, rotate_logs_handler)
+ try: signal.signal(signal.SIGHUP, rotate_logs_handler)
+ finally: pass
finally: pass
@@ -309,8 +310,9 @@
ZEO.StorageServer.StorageServer(unix, storages)
-
- open(zeo_pid,'w').write("%s %s" % (os.getppid(), os.getpid()))
+ try: ppid, pid = os.getppid(), os.getpid()
+ except: pass # getpid not supported
+ else: open(zeo_pid,'w').write("%s %s" % (ppid, pid))
asyncore.loop()
except: