Commit b865f123 authored by Hanno Schlichting's avatar Hanno Schlichting

Backport c123220 from trunk

parent 37fee9c1
...@@ -8,6 +8,9 @@ http://docs.zope.org/zope2/releases/. ...@@ -8,6 +8,9 @@ http://docs.zope.org/zope2/releases/.
2.13.11 (unreleased) 2.13.11 (unreleased)
-------------------- --------------------
- Avoid conflicting signal registrations when run under mod_wsgi.
Allows the use of `WSGIRestrictSignal Off` (LP #681853).
- Make it possible to use WSGI without repoze.who. - Make it possible to use WSGI without repoze.who.
- Fixed serious authentication vulnerability in stock configuration. - Fixed serious authentication vulnerability in stock configuration.
......
...@@ -108,11 +108,20 @@ def registerZopeSignals(loggers): ...@@ -108,11 +108,20 @@ def registerZopeSignals(loggers):
if not SignalHandler: if not SignalHandler:
return return
SignalHandler.registerHandler(SIGTERM, shutdownFastHandler)
SignalHandler.registerHandler(SIGINT, shutdownHandler) mod_wsgi = True
try:
from mod_wsgi import version
except ImportError:
mod_wsgi = False
if not mod_wsgi:
SignalHandler.registerHandler(SIGTERM, shutdownFastHandler)
SignalHandler.registerHandler(SIGINT, shutdownHandler)
if os.name != 'nt': if os.name != 'nt':
SignalHandler.registerHandler(SIGHUP, restartHandler) if not mod_wsgi:
SignalHandler.registerHandler(SIGUSR1, showStacks) SignalHandler.registerHandler(SIGHUP, restartHandler)
SignalHandler.registerHandler(SIGUSR1, showStacks)
SignalHandler.registerHandler(SIGUSR2, LogfileReopenHandler(loggers)) SignalHandler.registerHandler(SIGUSR2, LogfileReopenHandler(loggers))
else: else:
# no restart handler on windows. # no restart handler on windows.
......
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