Commit 6c7d7749 authored by Tim Peters's avatar Tim Peters

Port from 2.7 branch.

Shut down cleanly when Windows is shutting down.
parent 6a4bd4c8
......@@ -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