Issue1270

classification
Title: CRTL+C kills Jython console
Type: Severity: normal
Components: None Versions: 2.5.1
process
Status: pending Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: a_o_m, boisgera, fwierzbicki, nriley, pekka.klarck, pjenvey, zyasoft
Priority: low Keywords:

Created on 2009-03-09.21:15:47 by boisgera, last changed 2009-09-24.15:39:01 by pekka.klarck.

Messages
msg4212 (view) Author: (boisgera) Date: 2009-03-09.21:15:47
CTRL+C in Jython 2.5b2 does not exit the console properly: the shell
behaves strangely afterwards, with NEWLINE not working anymore for example.
msg4213 (view) Author: (boisgera) Date: 2009-03-09.21:54:53
Well, to be fair:

  1. CTRL+D exits properly,

  2. an exit on CTRL+C (clean or not) is not the CPython behavior. 
Instead it displays 'KeyboardInterrupt' and does not exit.
msg4214 (view) Author: Nicholas Riley (nriley) Date: 2009-03-09.22:25:19
This will likely be fixable on Unix by registering a SIGINT handler. Not 
sure about Windows.
msg4435 (view) Author: Jim Baker (zyasoft) Date: 2009-04-04.03:25:59
This may be a function of the underlying readline support. Now that we
have JLine installed by default, on OS X at the very least it exhibits
the same behavior as CPython. No signal handling required!
msg4746 (view) Author: Philip Jenvey (pjenvey) Date: 2009-05-29.01:14:09
boisgera, is this still a problem?
msg4798 (view) Author: (boisgera) Date: 2009-06-05.11:49:47
I removed my registry file so that GnuReadline does not kick in. The
registry file was:

   python.console=org.python.util.ReadlineConsole
   python.console.readlinelib=GnuReadline

That change alone did cause the beta 3 version to exit properly on a
CTRL+C. The RC3 version exhibits the same behavior (and the rev. 6450 as
well): clean exit on CTRL+C when the Readline console is not selected,
ugly exit when the registry file is present, and never the
'KeyboardInterrupt' behavior.
msg4848 (view) Author: Philip Jenvey (pjenvey) Date: 2009-06-22.02:14:35
this is a dupe of #1746106
msg5190 (view) Author: Pekka Klärck (pekka.klarck) Date: 2009-09-24.12:53:56
I just tested this with 2.5 rc 3 and could still reproduce the problem.
Is this a regression?

Ctrl-c killing the console isn't that big problem, but the fact that
ctrl-c cannot be caught as KeyboardInterrupt (issue 1313) means that I
cannot implement graceful shutdown from the CLI to my app easily. I
assume these problems have the same root cause.
msg5191 (view) Author: Pekka Klärck (pekka.klarck) Date: 2009-09-24.12:59:16
Ooops, the version I used in testing was 2.5.1 RC 3 i.e. the latest
available release.
msg5194 (view) Author: Jim Baker (zyasoft) Date: 2009-09-24.15:35:31
This is still outstanding; there has been no regression.
msg5195 (view) Author: Pekka Klärck (pekka.klarck) Date: 2009-09-24.15:39:01
I thought this was closed as the resolution says 'fixed'.
History
Date User Action Args
2009-09-24 15:39:01pekka.klarcksetmessages: + msg5195
2009-09-24 15:35:31zyasoftsetmessages: + msg5194
2009-09-24 12:59:16pekka.klarcksetmessages: + msg5191
2009-09-24 12:53:57pekka.klarcksetnosy: + pekka.klarck
messages: + msg5190
title: CRTL+C in Jython 2.5b2 Console -> CRTL+C kills Jython console
2009-06-22 02:14:35pjenveysetnosy: + a_o_m
messages: + msg4848
2009-06-05 11:49:48boisgerasetmessages: + msg4798
2009-05-29 01:14:09pjenveysetnosy: + pjenvey
messages: + msg4746
2009-04-04 03:25:59zyasoftsetstatus: open -> pending
resolution: fixed
messages: + msg4435
nosy: + zyasoft
2009-03-14 14:18:13fwierzbickisetnosy: + fwierzbicki
2009-03-14 14:18:02fwierzbickisetpriority: low
versions: + 2.5.1
2009-03-09 22:25:19nrileysetnosy: + nriley
messages: + msg4214
2009-03-09 21:54:53boisgerasetmessages: + msg4213
2009-03-09 21:15:47boisgeracreate