Commit 39bfafe5 authored by Guido van Rossum's avatar Guido van Rossum

Unlink the zeo_pid file at the end. This is how it was in the olden

days.  At least the script zeostart.py did this, and it was a clone of
ZEO1/start.py except for that added feature.  Our sysadmin desperately
wants that feature.
parent a573587d
...@@ -263,7 +263,9 @@ def main(argv): ...@@ -263,7 +263,9 @@ def main(argv):
except: except:
pass # getpid not supported pass # getpid not supported
else: else:
open(env.zeo_pid,'w').write("%s %s\n" % (ppid, pid)) f = open(env.zeo_pid, 'w')
f.write("%s %s\n" % (ppid, pid))
f.close()
except: except:
# Log startup exception and tell zdaemon not to restart us. # Log startup exception and tell zdaemon not to restart us.
...@@ -279,7 +281,11 @@ def main(argv): ...@@ -279,7 +281,11 @@ def main(argv):
sys.exit(0) sys.exit(0)
try: try:
asyncore.loop() try:
asyncore.loop()
finally:
if os.path.isfile(env.zeo_pid):
os.unlink(env.zeo_pid)
except SystemExit: except SystemExit:
raise raise
except: except:
......
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