Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exiting mvn scala:console leaves terminal unusable #71

Closed
tnm opened this issue Dec 13, 2011 · 5 comments
Closed

Exiting mvn scala:console leaves terminal unusable #71

tnm opened this issue Dec 13, 2011 · 5 comments

Comments

@tnm
Copy link
Contributor

tnm commented Dec 13, 2011

Starting a console session in Terminal.app on OS X 10.6.6.

tnm$ echo $TERM
xterm-color

tnm$ mvn scala:console

Welcome to Scala version 2.9.1.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_22).   
Type in expressions to have them evaluated.  
Type :help for more information.

scala> 

Exit with Control-C or Control-D.

tnm$

Typing foo shows nothing on the command line. Press enter.

tnm$  -bash: foo: command not found

Press enter several times again. Prompts continue to be displayed on a single line.

tnm$  tnm$ tnm$  tnm$

Commands do work (after one hits enter), but whatever is typed is not displayed, and in general the terminal is not usable.

@jsuereth
Copy link
Collaborator

This is an issue with using JLINE and SIGTERM-ing an application. JLine
doesn't have a chance to clean up and your BASH is killed horribly. i
think there's a fix in the latest Scala release.

What version of Scala are you using?

Note: A workaround is to type 'reset' after this happens.

  • Josh

@tnm
Copy link
Contributor Author

tnm commented Dec 13, 2011

Thanks for the quick response! Scala version:

tnm$ scala 
Welcome to Scala version 2.9.1.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_22).

@tc
Copy link

tc commented Dec 17, 2011

This is also happening to me on
2.9.1.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_29) mac os x 10.7.2
and
2.9.1.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_26). ubuntu 10.04.03

@holograph
Copy link

This is a pervasive bug with the Scala console (or jline, or some other dependency). I know for a fact it hasn't been fixed on <=2.9.2, I'll try to find the relavant bug in Typesafe's JIRA for historical purposes but otherwise I don't think there's much that can be done here (also note the workaround mentioned by @jsuereth above).

@slandelle
Copy link
Collaborator

Closing as I don't think this will ever be investigated; IMHO, scala:console should be dropped in a future major version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants