Log message for revision 123234: Backport c123220 from trunk Changed: U Zope/branches/2.13/doc/CHANGES.rst U Zope/branches/2.13/src/Signals/Signals.py
-=- Modified: Zope/branches/2.13/doc/CHANGES.rst =================================================================== --- Zope/branches/2.13/doc/CHANGES.rst 2011-11-01 19:07:58 UTC (rev 123233) +++ Zope/branches/2.13/doc/CHANGES.rst 2011-11-01 19:08:41 UTC (rev 123234) @@ -8,6 +8,9 @@ 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. - Fixed serious authentication vulnerability in stock configuration. Modified: Zope/branches/2.13/src/Signals/Signals.py =================================================================== --- Zope/branches/2.13/src/Signals/Signals.py 2011-11-01 19:07:58 UTC (rev 123233) +++ Zope/branches/2.13/src/Signals/Signals.py 2011-11-01 19:08:41 UTC (rev 123234) @@ -108,11 +108,20 @@ if not SignalHandler: 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': - SignalHandler.registerHandler(SIGHUP, restartHandler) - SignalHandler.registerHandler(SIGUSR1, showStacks) + if not mod_wsgi: + SignalHandler.registerHandler(SIGHUP, restartHandler) + SignalHandler.registerHandler(SIGUSR1, showStacks) SignalHandler.registerHandler(SIGUSR2, LogfileReopenHandler(loggers)) else: # no restart handler on windows. _______________________________________________ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins