Stopping Windows Service
D
duncanm255 at hotmail.com
Wed Mar 1 15:41:27 EST 2006
I have a simple file server utility that I wish to configure as a
Windows service - using the examples of the Python Win32 book, I
configured a class for the service, along with the main class functions
__init__, SvcStop, and SvcDoRun (which contains my server code). After
registering the service, I am able to start it with no problems.
However, it never stops correctly (net stop returns "service could not
be stopped") and service is left in a Stopping state. My gut tells me
there's something additional I need to include in the SvcDoRun function
in order to have it shutdown gracefully, but I'm not sure what. Also,
if that is the case, where should I place the statements within the
function (i.e. right after the listen() statement?)? Thanks as
always..
Doug
More information about the Python-list
mailing list