summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/CompileClient.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-02-22 19:33:51 +0000
committerPaul Phillips <paulp@improving.org>2011-02-22 19:33:51 +0000
commit6961f663710ac4b61b4f6ef6dd3a34ff9ff7ca00 (patch)
treedf4466c3ba8a91f1be915b65f9eccb0591096551 /src/compiler/scala/tools/nsc/CompileClient.scala
parent8aaca8c135d6dcbc56b9bba92cd95ea5ea0a7e3c (diff)
downloadscala-6961f663710ac4b61b4f6ef6dd3a34ff9ff7ca00.tar.gz
scala-6961f663710ac4b61b4f6ef6dd3a34ff9ff7ca00.tar.bz2
scala-6961f663710ac4b61b4f6ef6dd3a34ff9ff7ca00.zip
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.
Diffstat (limited to 'src/compiler/scala/tools/nsc/CompileClient.scala')
-rw-r--r--src/compiler/scala/tools/nsc/CompileClient.scala13
1 files changed, 9 insertions, 4 deletions
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))