[Python-Dev] KeyboardInterrupt on Windows (original) (raw)

Raymond Hettinger python@rcn.com
Fri, 30 May 2003 17:23:47 -0400


On Fri, May 30, 2003 at 04:40:00PM -0400, Neal Norwitz wrote: > On Fri, May 30, 2003 at 04:35:53PM -0400, Guido van Rossum wrote: > > I received this problem report (Kurt is the IDLEFORK developer). Does > > anybody know what could be the matter here? What changed recently??? > > > while 1: pass > > > > doesn't respond to a KeyboardInterrupt on Python2.3b1 on either > > WinXP or W2K.

The patch below fixes the problem by not optimizing while 1:pass.

That looks like a good fix to me.

There are two other ways:

Raymond