Select, interrupted system call, log rotation?

R

Rainy

I got an interrupted system call exception in select and I don't know
what could have caused it. Here's the error:

select.select(inputs, [], [], 9)
error: (4, 'Interrupted system call')
Caught an exception, shutting down...

It's py2.3, on mach architecture.

I'm trying to figure out what caused it, and the only idea I have so
far is that it could be that I have python's logging system log
rotation thing running and I think I've seen a reference somewhere
that it uses SIGALRM when log file reaches set size to stop and switch
the files. The program was running for about a week without any
problem and then I got this exception and after I restarted it it's
been running for a few days and I only got the exception once in all
that time.

Am I going in a completely wrong direction here? I'm thinking of just
putting select in try: except: , is that a good idea here?

I don't understand signals all that well. Thanks.
 
V

Vinay Sajip

I got an interrupted system call exception in select and I don't know
what could have caused it. Here's the error:

select.select(inputs, [], [], 9)
error: (4, 'Interrupted system call')
Caught an exception, shutting down...

It's py2.3, on mach architecture.

I'm trying to figure out what caused it, and the only idea I have so
far is that it could be that I have python's logging system log
rotation thing running and I think I've seen a reference somewhere
that it uses SIGALRM when log file reaches set size to stop and switch

Python's logging package doesn't use signals, as it's cross-platform.
The handler just checks when a log event is handled whether rotation
should occur, and if it should, then the log files are rotated.

Regards,


Vinay Sajip
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top