By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,963 Members | 1,749 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,963 IT Pros & Developers. It's quick & easy.

'Interrupted function call' in time.sleep(1000) after relogging

P: n/a

I have implemented a Python services. It behaves as a supervisor for
log files.
If the space used by log files is bigger than a given upper limit,
then it starts to delete log files until the space is less than a
given lower limit. It checks the space every 1000 secs. After that it
falls asleep. It is configured to start up automatically on system
boot. Everything works ok except one thing ... :( The service should
run even when I log off, so I made an experiment. It turned out that
after relogging (I have to press Ctrl+Ald+Del) the following exception
was raised:

The instance's SvcRun() method failed
File "C:\Python23\lib\site-packages\win32\lib\",
line 663, in SvcRun
File "C:\SEE\modules\adminapps\" , line 158,
in SvcDoRun
exceptions.IOError: (4, 'Interrupted function call')

Here is the part of my code (inside SvcDoRun) that generates the

#check if the service is going to be stopped
waitHandles = self.hWaitStop,
stp = win32event.WaitForMultipleObjects(waitHandles, 0,
if stp == win32event.WAIT_OBJECT_0:
#print "Received Quit from Win32"
time.sleep(1000) # <--- Exception generated here!!!

How can I solve it? Maybe I should try to patch a new timemodule.c
file? I have no idea :( I would be greatful for any hints.
I use Windows XP operating system.

Best wishes,

Jul 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.