ALARM on windows?

Andreas Jung andreas at andreas-jung.com
Mon Jan 15 06:33:55 EST 2001


On Mon, Jan 15, 2001 at 11:54:38AM +0100, Kalista Christophe wrote:
> I'm having trouble handling SIGALRM under windows!
> 
> I'd like to do the following : A python script listens to port 6664(for
> example). When it gets a connection, it then sets an alarm handler and then
> tries to read from the socket. If it does not get data within 10 seconds, it
> then times out, at which point the alarm handler throws an axception and
> aborts the socket read.
> 
> The problem is that I don't know how to handle signals under WINDOWS.

SIGALRM is not available in the signal module under Windows. In Python 2.0
there is asyncore module available (asynchronous socket handler). I imagine
that this will help to solve your problem.

Andreas
 




More information about the Python-list mailing list