Hi,

I'm using pywin32 on WinXP embedded to run a server service (using 
Win32serviceutil.py). The service is installed correctly and set up to run 
automatically on startup, which it does. The machine boots to the logon screen 
and the service can be verified to be running correctly.

If I now log onto the machine as administrator, the service is still running. 
When I log off however, I return to the windows logon screen, but the service 
seems to have stopped. Logging back in as administrator, the Windows services 
screen says the service has stopped. When I check the system log for 
applications, the following is logged:

The instance's SvcRun() method failed
  File "C:\python24\lib\site-packages\win32\lib\win32serviceutil.py" line 742, 
in self.SvcDoRun()
  File "C:\myservice\myservice.py" line 123 in SvcDoRun time.sleep(5)
exceptions.IOError: (4, "Interrupted function call")

What does this mean? Why does logging out of the Admin account affect a 
background service? Is this a known issue? I've copied the example and modified 
very little. My service is effectively an infinite loop that periodically 
checks if the 'real' server process (another python program) has died, and if 
so restarts it. Is this some weird issue with using sleep within the service's 
main method? If so, how can I get round this problem?

I'm using pywin 2.0.4 and python 2.4.3

Thanks for any help anyone can give :-)

Tom
_______________________________________________
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to