From 6961f663710ac4b61b4f6ef6dd3a34ff9ff7ca00 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Tue, 22 Feb 2011 19:33:51 +0000 Subject: Added daemonized() method to ProcessBuilder so ... Added daemonized() method to ProcessBuilder so I can do things like start fsc without the jvm failing to exit. More logging to fsc. scala -e '5' now works again. Closes #4254, review by harrah. --- src/compiler/scala/tools/nsc/CompileClient.scala | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/compiler/scala/tools/nsc/CompileClient.scala') diff --git a/src/compiler/scala/tools/nsc/CompileClient.scala b/src/compiler/scala/tools/nsc/CompileClient.scala index 752e9a7930..d1b1f751ef 100644 --- a/src/compiler/scala/tools/nsc/CompileClient.scala +++ b/src/compiler/scala/tools/nsc/CompileClient.scala @@ -19,6 +19,10 @@ class StandardCompileClient extends HasCompileSocket { val versionMsg = "Fast " + Properties.versionMsg var verbose = false + def logVerbose(msg: String) = + if (verbose) + Console println msg + def main0(argsIn: Array[String]): Int = { // TODO: put -J -and -D options back. Right now they are lost // because bash parses them out and they don't arrive. @@ -32,10 +36,11 @@ class StandardCompileClient extends HasCompileSocket { Console println versionMsg return 0 } - if (verbose) { - Console println fscArgs.mkString("[Given arguments: ", " ", "]") - Console println vmArgs.mkString("[VM arguments: ", " ", "]") - } + + logVerbose(versionMsg) + logVerbose(fscArgs.mkString("[Given arguments: ", " ", "]")) + logVerbose(vmArgs.mkString("[VM arguments: ", " ", "]")) + val socket = if (settings.server.value == "") compileSocket.getOrCreateSocket(vmArgs mkString " ", !shutdown) else Some(compileSocket.getSocket(settings.server.value)) -- cgit v1.2.3