[ python-Bugs-875692 ] Ctrl-C doesn't work with sleepy main thread

SourceForge.net noreply at sourceforge.net
Mon Jan 12 16:37:57 EST 2004


Bugs item #875692, was opened at 2004-01-12 21:37
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=875692&group_id=5470

Category: Threads
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Matthias Klose (doko)
Assigned to: Nobody/Anonymous (nobody)
Summary: Ctrl-C doesn't work with sleepy main thread

Initial Comment:
[forwarded from http://bugs.debian.org/226547]

I only have access to Debian systems ... Maybe this is
related to 846817?

I'm trying to do some basic threading with Python.
However, there are times when Ctrl-C fails to cause a
KeyboardInterrupt in the main thread.

Here is a test program that illustrates the problem. As
written, I cannot interrupt it with Ctrl-C (nothing
happens even if I hold it down). If I uncomment the
print statement in the main thread, then I can
interrupt it with Ctrl-C.

It seems like adding the print in the main thread gives
the main thread a "chance to run" where it finally
notices the signal from the Ctrl-C.  However, I
shouldn't have to use hacks like this to get this to work.

People on comp.lang.python could not reproduce this on
Fedora and some others, so I'm posting it here (maybe
some problem with Debian's libc6?).


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=875692&group_id=5470



More information about the Python-bugs-list mailing list