Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

exiting the repl console with a background process

Tags:

How do you exit from the repl console in sbt with a background process running? The following hangs:

$ sbt > console Welcome to Scala version 2.9.1.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_26).  scala> import scala.sys.process._ import scala.sys.process._  scala> "sleep 10000".run res0: scala.sys.process.Process = scala.sys.process.ProcessImpl$SimpleProcess@67219b8c  scala> <ctrl-d entered> ...hangs 

ctrl-c works, but kills sbt too. I suppose I'm looking for a letter between ctrl-c and ctrl-d.

like image 415
Lee Mighdoll Avatar asked Nov 18 '11 20:11

Lee Mighdoll


People also ask

How to exit sbt console?

To leave sbt shell, type exit or use Ctrl+D (Unix) or Ctrl+Z (Windows).

How do you stop an execution in REPL?

You can exit the REPL by typing Ctrl+D (pressing the Ctrl and D keys at the same time).


1 Answers

Enter :q to quit the console (it will lead to some sort of hanging), and, then, ctrl+c.

like image 182
Vasil Remeniuk Avatar answered Oct 03 '22 11:10

Vasil Remeniuk