Commit 3be5ff62 authored by Ross Patterson's avatar Ross Patterson

Cleanup lock and pid files if the process dies early in startup.

parent 025e2215
...@@ -8,6 +8,8 @@ http://docs.zope.org/zope2/releases/. ...@@ -8,6 +8,8 @@ http://docs.zope.org/zope2/releases/.
2.13.14 (unreleased) 2.13.14 (unreleased)
-------------------- --------------------
- Cleanup lock and pid files if the process dies early in startup.
- Added PubStart, PubBeforeCommit and PubAfterTraversal events to the - Added PubStart, PubBeforeCommit and PubAfterTraversal events to the
WSGI publisher. WSGI publisher.
......
...@@ -18,8 +18,11 @@ def run(): ...@@ -18,8 +18,11 @@ def run():
starter = Zope2.Startup.get_starter() starter = Zope2.Startup.get_starter()
opts = _setconfig() opts = _setconfig()
starter.setConfiguration(opts.configroot) starter.setConfiguration(opts.configroot)
try:
starter.prepare() starter.prepare()
starter.run() starter.run()
finally:
starter.shutdown()
def configure(configfile): def configure(configfile):
""" Provide an API which allows scripts like zopectl to configure """ Provide an API which allows scripts like zopectl to configure
......
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