This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Python 2.4a1, interpreter hanging on Keyboard Interrupt
Type: Stage:
Components: Interpreter Core Versions: Python 2.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: mwh Nosy List: anthonybaxter, mwh, simon.percivall
Priority: normal Keywords:

Created on 2004-07-08 13:28 by simon.percivall, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
987287-fix.diff mwh, 2004-07-08 15:33 recently applied fix
Messages (5)
msg21445 - (view) Author: Simon Percivall (simon.percivall) Date: 2004-07-08 13:28
This is how I hang the intepreter in 2.4a1:

python2.4
...
>>> import readline
>>> import rlcompleter
>>> import thread
>>> thread.start_new_thread((lambda: 1), ())
>>> ^C
(Python Interpreter hangs)

The ^C of course is the Keyboard interrupt. It doesn't
matter if I write something on the command line and
then press ^C, the interpreter still hangs.

This is new. The interpreter won't hang under Python
2.3.4; it won't hang under Python 2.4a0.

It specifically changed sometime thursday and friday
(Python 2.4a0 -> Python 2.4a1). This might indicate the
change logged as: "Non-main threads no longer have all
signals masked." or the change logged as: "A different
interface to readline is used." is to blame.
msg21446 - (view) Author: Simon Percivall (simon.percivall) Date: 2004-07-08 13:41
Logged In: YES 
user_id=329382

I forgot to say: I'm using Mac OS X 10.3, fink project readline.
msg21447 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2004-07-08 13:51
Logged In: YES 
user_id=6656

Confirmed on linux/x86.

Hmm, I see the problem (my lack of understanding of the
Python thread API).  I have a fix (just running make test)
but I don't know what the score is wrt 2.4a1...
msg21448 - (view) Author: Anthony Baxter (anthonybaxter) (Python triager) Date: 2004-07-08 13:59
Logged In: YES 
user_id=29957

Well, 2.4a1 is already out the door (well, almost), so any
fix will have to go into 2.4a2. Feel free to post a patch
here as well, though, so we can point the hordes of testers
who discover this bug at this patch.

msg21449 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2004-07-08 15:30
Logged In: YES 
user_id=6656

Here's the patch that just got checked in as 

Modules/readline.c revision 2.72
Parser/myreadline.c revision 2.33

Should go onto /2.4/bugs.html when that exists...
History
Date User Action Args
2022-04-11 14:56:05adminsetgithub: 40523
2004-07-08 13:28:42simon.percivallcreate