summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/CompileSocket.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/CompileSocket.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/CompileSocket.scala')
-rw-r--r--src/compiler/scala/tools/nsc/CompileSocket.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/CompileSocket.scala b/src/compiler/scala/tools/nsc/CompileSocket.scala
index 4f71a3da87..c75c6d0f22 100644
--- a/src/compiler/scala/tools/nsc/CompileSocket.scala
+++ b/src/compiler/scala/tools/nsc/CompileSocket.scala
@@ -110,7 +110,7 @@ class CompileSocket {
private def startNewServer(vmArgs: String) = {
val cmd = serverCommand(vmArgs split " " toSeq)
info("[Executing command: %s]" format cmd)
- cmd.run()
+ cmd.daemonized().run()
}
/** The port identification file */
@@ -132,8 +132,10 @@ class CompileSocket {
var attempts = 0
var port = pollPort()
- if (port < 0)
+ if (port < 0) {
+ info("No compile server running: starting one with args '" + vmArgs + "'")
startNewServer(vmArgs)
+ }
while (port < 0 && attempts < MaxAttempts) {
attempts += 1