Commit 533a5116 authored by Tim Peters's avatar Tim Peters

Merge rev 30868 from 2.8 branch.

Port from 2.7 branch.

Shut down cleanly when Windows is shutting down.
parent ec69f0e1
......@@ -85,6 +85,11 @@ class Service(win32serviceutil.ServiceFramework):
# 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
......
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