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.

Author morngnstar
Recipients
Date 2003-06-18.23:52:36
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
This is related to Bug #756924.

When os.system is called in a thread, Control-C is 
ignored.

Steps to reproduce:
1. Download the attached file fibonacci.py.
2. Run python2.2 fibonacci.py.
3. Hit CNTRL-C.

fibonacci.py starts a thread that executes fibonacci.py 
again (but with a flag to prevent this from recursing 
infinitely). Then it computes and prints the Fibonacci 
sequence, the slow way. The process executed in the 
thread redirects this to a file to avoid conflict over 
stdout. All this is just to give the program something to 
do while you hit CNTRL-C.

Expected, and Python 2.1 behavior:
You get a KeyboardInterrupt exception, a stack trace, 
and the program exits.

Actual Python 2.2 behavior:
No response. You have to run kill on the process.

Maybe this is not a bug, but rather a limitation of Linux, 
since I understand SIGINT is blocked during the C 
function 'system'. However, CNTRL-C worked in Python 
2.1, and that was nicer.


Removing the lines of code described in Bug #756924 
also fix this bug.
History
Date User Action Args
2007-08-23 14:14:07adminlinkissue756940 messages
2007-08-23 14:14:07admincreate