Commit 1f9a72ae authored by Toby Dickenson's avatar Toby Dickenson

Merged remaining changes from toby-clean-shutdown-branch. This resolves the...

Merged remaining changes from toby-clean-shutdown-branch. This resolves the overnight problem where storages were not closed if Zope is shut down using the ZMI, and the long-standing problem where storages were closed too soon when shut down using a signal
parent a6b6ca2d
......@@ -11,8 +11,8 @@
#
##############################################################################
__doc__="""System management components"""
__version__='$Revision: 1.84 $'[11:-2]
__version__='$Revision: 1.85 $'[11:-2]
import sys,os,time,Globals, Acquisition, os, Undo
from Globals import DTMLFile
......
......@@ -909,5 +909,11 @@ sys.ZServerExitCode=0
import Lifetime
Lifetime.loop()
code = sys.ZServerExitCode
zLOG.LOG('z2', zLOG.INFO, "Closing all open ZODB databases")
import Globals
for db in Globals.opened:
db.close()
zLOG.LOG("z2", zLOG.INFO, 'Exiting with code %d' % code )
sys.exit(code)
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