JLine is not restoring terminal settings appropriately on some linux environments
GoogleCodeExporter opened this issue · comments
The following behavior was observed on several linux platforms (Ubuntu
9.10 was one of the ones mentioned):
a) interactive interpreter
- issued "quit;"
=> terminal messed up (stdin seems to be swallowed and not
re-echoed)
b) interactive interpreter
- issued control-c
=> terminal OK
c) CMD < test.jaql
=> terminal messed up (same result as (a) )
d) CMD --batch test.jaql
=> terminal OK
There seem to be small differences in how JLine resets the terminal:
diff jline_stty original_stty
9c9
< isig -icanon iexten -echo echoe echok -echonl -noflsh -xcase -tostop -
echoprt
---
> isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -
echoprt
If there is a bug in jline, lets post a work-around on the wiki:
e.g., -Djline.terminal=jline.UnsupportedTerminal
Let's also try and properly restore settings in jaql's shell script,
something like:
$ export RESTORETTY=`stty -g`
< start/stop jaqlshell>
$ stty `echo $RESTORETTY`
Original issue reported on code.google.com by vuk.erce...@gmail.com
on 20 Apr 2010 at 2:25
Add "disable" work-around in Revision 540.
Original comment by yaojingguo@gmail.com
on 20 Apr 2010 at 7:59
On Fedora, all use cases work flawlessly.
My guess is that whenever you hit CTRL+C, the restore STY commands are not be
executed. So do we need these commmands at all? I believe that we disabled them
on
Linux some time ago...
Original comment by Rainer.G...@gmx.de
on 20 Apr 2010 at 5:38
Problem turns out to be related to using the IBM jdk. Jline restores the
console
correctly with the Sun jdk.
Original comment by joel.bet...@gmail.com
on 23 Apr 2010 at 12:26
Fixed in Revision 551.
Original comment by yaojingguo@gmail.com
on 24 Apr 2010 at 6:07
- Changed state: Fixed