Can't Stop Process On Windows

Dave Brueck dave at pythonapocrypha.com
Tue Apr 12 08:53:04 EDT 2005


Dan wrote:
> I have a python script running under Windows XP that I need to
> terminate from the keyboard.  A control-c works fine under Linux, but
> not under Windows.  I'm pretty sure that the culprit is 'select' that
> I'm using to multiplex socket i/o, which seems to be blocking the
> keyboard interrupt.  Is there some way around this?

Are you calling select with a long timeout? An alternative would be to call 
select with a much shorter timeout, but call it multiple times from a loop.



More information about the Python-list mailing list