Ilya Sandler <ilya.sand...@gmail.com> added the comment:

I confirm the bug. But I don't think disabling Ctrl-C (SIGINT) handling by 
default is a good idea. Proper Ctrl-C support seems like a fundamental feature 
for a command line debugger. 

However, I think the bug is easily fixable w/o changing SIGINT handling. 
Basically, just put try/except around signal.signal, catch the ValueError and 
proceed. Would this approach solve your problem?

Patch attached.

PS. and here is a small program demonstrating the bug (just run it and execute 
"c" command at pdb prompt)

 import threading
 import pdb

 def start_pdb():
    pdb.Pdb().set_trace()
    x = 1
    y = 1

 t = threading.Thread( target=start_pdb)
 t.start()

----------
keywords: +patch
nosy: +isandler
Added file: http://bugs.python.org/file23791/thread_sigint.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13120>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to