Bug 1013973 - Installer: Cannot use Ctrl+c to quit installation (windows)
Installer: Cannot use Ctrl+c to quit installation (windows)
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Installer (Show other bugs)
6.2.0
Unspecified Windows
unspecified Severity urgent
: ER7
: EAP 6.2.0
Assigned To: Miles Tjandrawidjaja
Petr Kremensky
Russell Dickenson
: Regression
Depends On:
Blocks: 1092977
  Show dependency treegraph
 
Reported: 2013-10-01 03:45 EDT by Petr Kremensky
Modified: 2014-04-30 07:01 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
An issue with specifying a JLine dependency resulted in the +Ctrl-C+ keyboard command not functioning in the console installer of JBoss EAP 6 on Microsoft Windows Server. In this release of JBoss EAP 6, JLine has been updated so that when +Ctrl-C+ is entered during a console installation on Microsoft Windows Server, the installer now quits as expected. Also note that the +Insert+ key is read as the same character as +Ctrl-C+, and will also quit the console installer if pressed.
Story Points: ---
Clone Of:
: 1092977 (view as bug list)
Environment:
Last Closed: 2013-12-15 11:16:32 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Petr Kremensky 2013-10-01 03:45:47 EDT
Description of problem:
 I am unable to quit from console installation using Ctrl+C shortcut.

OS:
 Windows

Version-Release number of selected component (if applicable):
 EAP 6.2.0.ER3

Steps to Reproduce:
 1. Start the console installation
 2. Press Ctrl+C

Actual results:
 Nothing really happens.

Expected results:
 Installation will quit.

Additional info:
 Regression against EAP 6.1.1
Comment 1 Miles Tjandrawidjaja 2013-10-21 15:02:05 EDT
Hello,

I've looked into this, and found out a change in the jline dependency is needed to resolve this issue. After some testing I found out jline read the Insert button and Ctrl-C as the same character code on windows. Making a change in jline's ConsoleReader.java class will allow use to exit with Ctrl-C (but also if the Insert button if pressed)

If you would like to exit with a similar combination I have made some changes so that Ctrl-D will exit your program. The reason for this is because there is a bug where Ctrl-D will pass in a null value into our installer. Also the unix meaning of Ctrl-D means the end of any further text input.

http://git.app.eng.bos.redhat.com/izpack.git/commit/?h=izpack-wip&id=892cdca7e01a9b558a81dad60fb1c2863c116670

While playing with jline I also got the tilde to expand the the full path of the user's home directory, both in windows and unix (https://bugzilla.redhat.com/show_bug.cgi?id=883419). Although on windows paths starting with C:\ seems like it still won't auto-complete(https://bugzilla.redhat.com/show_bug.cgi?id=1013972). If we end up being able to modify jline I may look into these more.

Let me know what actions to take if any. Thanks.
Comment 2 Petr Kremensky 2013-10-22 02:47:27 EDT
Hi Miles,
can you than look more into jline and try to modify it so we get the same behaviour for Ctlr+C and Insert as we have with 6.1.1 installer? 
Thanks
Comment 3 Miles Tjandrawidjaja 2013-10-23 10:43:07 EDT
Hello,

Jline has been updated so Ctrl+C will not exit the console installation on Windows. Modifications have also been made for places where jline is not used to enable Ctrl+C to exit from console installation on windows.

http://git.app.eng.bos.redhat.com/izpack.git/commit/?h=izpack-wip
Comment 4 Miles Tjandrawidjaja 2013-10-23 11:02:59 EDT
Correction to above comment.
Ctrl+C will 'now' exit the console installation on Windows.
Comment 5 Petr Kremensky 2013-11-01 10:25:13 EDT
Verified on EAP 6.2.0.ER7 installer.
Comment 7 Petr Kremensky 2013-11-13 02:54:30 EST
We may add the note about jline reading the Insert button and Ctrl-C as the same character code on windows -> exit the console installation. Someone may be confused by this.

Note You need to log in before you can comment on or make changes to this bug.