473,322 Members | 1,431 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

"Interrupted function call" exception while relogging :(

Hi!

I need your help...

I have the following problem. I've implemented the python Windows
Service which behaves like a log supervisor. 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. I configured the service to start up automatically on
system boot. The script checks the space used by log files

every 1000 secs. After analyse of the space, it falls asleep
(time.sleep(1000)). Everything works OK, except one thing...

Since the service is not tied to the user ID of the person starting
it, the service should remain open even when that person

who started it logs off. So I made an experiment and relogged. After
that it turned out that the service stopped working. The

Event Viewer returned the error:

"SvcDoRun
time.sleep(1000)
exceptions.IOError: [Errno 4] Interrupted function call
"
I use Window XP OS and Python and Python 2.3.2

I guess that some asynchronous signal was caught by the process during
the execution of an interruptible function

(time.sleep(1000)). Maybe it happened while pressing Ctrl+Alt+Del
sequence during logging? Maybe I should add some signal

handling?
Unfortunately the Windows signal implementation is limited to 6
signals(???):

SIGABRT Abnormal termination
SIGFPE Floating-point error
SIGILL Illegal instruction
SIGINT CTRL+C signal
SIGSEGV Illegal storage access
SIGTERM Termination request

Please help me...

Best wishes,

Sylwia
Jul 18 '05 #1
2 3737
lu********@go2.pl (Sylwia) writes:
Hi!

I need your help...

I have the following problem. I've implemented the python Windows
Service which behaves like a log supervisor. 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. I configured the service to start up automatically on
system boot. The script checks the space used by log files

every 1000 secs. After analyse of the space, it falls asleep
(time.sleep(1000)). Everything works OK, except one thing...

Since the service is not tied to the user ID of the person starting
it, the service should remain open even when that person

who started it logs off. So I made an experiment and relogged. After
that it turned out that the service stopped working. The

Event Viewer returned the error:

"SvcDoRun
time.sleep(1000)
exceptions.IOError: [Errno 4] Interrupted function call
"
I use Window XP OS and Python and Python 2.3.2


Just an idea: you could try to use win32api.Sleep() instead.

Thomas
Jul 18 '05 #2

Uzytkownik "Thomas Heller" <th*****@python.net> napisal w wiadomosci >
writes:
Just an idea: you could try to use win32api.Sleep() instead.

Thomas


Thanks! I will try now and let you know if it works for my case... Thanks
for reply!

Best wishes,

Sylwia
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Nazgul | last post by:
Hi! Sorry if I posted it twice... I need your help... I have the following problem. I've implemented the python Windows Service which behaves like a log supervisor. If the space used by log...
1
by: Newgene | last post by:
Hi, group, I am trying to dynamically add a method to class by following this post: ...
5
by: Michael Stevens | last post by:
Probably the wrong wording but since I'm not a scripter I won't claim to know what I'm talking about. I got this script from www.htmlgoodies.com <script language="JavaScript"> <!--...
5
by: Dmitriy Lapshin [C# / .NET MVP] | last post by:
Hi all, I think the VB .NET compiler should at least issue a warning when a function does not return value. C# and C++ compilers treat this situation as an error and I believe this is the right...
13
by: Larry Menard | last post by:
Test code: $dbconn = odbc_connect($dbname, $username, $password); $path = "C:\Temp\myJar.jar"; $statement = "CALL SQLJ.INSTALL_JAR('file://$path', 'myJarId')"; $result = odbc_exec($dbconn,...
0
by: mtanq | last post by:
My project is an ASP-based web page, with C# as the language of choice. I have written a simple tree view that displays the structure of a file system mounted as 'MVFS' (On my system, it's W:/)....
1
by: mtanq | last post by:
My project is an ASP-based web page, with C# as the language of choice. I have written a simple tree view that displays the structure of a file system mounted as 'MVFS' (On my system, it's W:/)....
28
by: Jess | last post by:
Hello, It is said that if I implement a "swap" member function, then it should never throw any exception. However, if I implement "swap" non- member function, then the restriction doesn't...
2
by: Rahul | last post by:
Hi everyone, I have the following code and it doesn't give any compilation error, class A { public : A() { } void show()
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.