[Zope-Checkins] SVN: Zope/trunk/lib/python/nt_svcutils/service.py
Merge rev 30868 from 2.8 branch.
Tim Peters
tim.one at comcast.net
Mon Jun 20 16:49:44 EDT 2005
Log message for revision 30869:
Merge rev 30868 from 2.8 branch.
Port from 2.7 branch.
Shut down cleanly when Windows is shutting down.
Changed:
U Zope/trunk/lib/python/nt_svcutils/service.py
-=-
Modified: Zope/trunk/lib/python/nt_svcutils/service.py
===================================================================
--- Zope/trunk/lib/python/nt_svcutils/service.py 2005-06-20 20:46:59 UTC (rev 30868)
+++ Zope/trunk/lib/python/nt_svcutils/service.py 2005-06-20 20:49:44 UTC (rev 30869)
@@ -85,6 +85,11 @@
# Set the stop event - the main loop takes care of termination.
win32event.SetEvent(self.hWaitStop)
+ # SvcStop only gets triggered when the user explictly stops (or restarts)
+ # the service. To shut the service down cleanly when Windows is shutting
+ # down, we also need to hook SvcShutdown.
+ SvcShutdown = SvcStop
+
def onStop(self):
# A hook for subclasses to override
pass
More information about the Zope-Checkins
mailing list