From: Pekka Klärck <report@bu...> - 2009-04-11 19:11:52
New submission from Pekka Klärck <peke@...>:
It seems that 'except KeyboardInterrupt' or even plain 'except' is not
enough to catch ctrl-c with Jython. This is unfortunate because it makes
it prevents stopping applications started from the command line gracefully.
This problem can be tested with the attached script. When I execute it
with Jython (tested both with 2.2 and 2.5b3) on my OS X and press ctrl-c
it simply quits without even a traceback. With CPython it prints both
'KeyboardInterrupt' and 'Bye!' before exiting cleanly.
Issue 1746106 is probably related to this problem:
title: KeyboardInterrupt does not catch ctrl-c
Added file: http://bugs.jython.org/file647/ctrlc.py
Jython tracker <report@...>