summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-04-24 15:17:41 +0000
committerPaul Phillips <paulp@improving.org>2010-04-24 15:17:41 +0000
commit810deda16afc1d9b13e43c68e895b683549951d6 (patch)
treee90af4aba96cc26187e3abe6ad441efce33697ec /src
parentee1042f8c6f9981833176acd3fbdb8782f175888 (diff)
downloadscala-810deda16afc1d9b13e43c68e895b683549951d6.tar.gz
scala-810deda16afc1d9b13e43c68e895b683549951d6.tar.bz2
scala-810deda16afc1d9b13e43c68e895b683549951d6.zip
Another guess falling somewhere between educate...
Another guess falling somewhere between educated and wild as to how to get the auxjvm nightly passing again. No review.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/io/Process.scala22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/compiler/scala/tools/nsc/io/Process.scala b/src/compiler/scala/tools/nsc/io/Process.scala
index 698082d19e..ebd7937f33 100644
--- a/src/compiler/scala/tools/nsc/io/Process.scala
+++ b/src/compiler/scala/tools/nsc/io/Process.scala
@@ -153,9 +153,8 @@ class Process(processCreator: () => JProcess) extends Iterable[String] {
private val reader = new BufferedReader(new InputStreamReader(in))
private def finish() {
- // make sure this thread is complete, and close the process's stdin
+ // make sure this thread is complete
join()
- _in.close()
}
def slurp(): String = {
@@ -171,14 +170,19 @@ class Process(processCreator: () => JProcess) extends Iterable[String] {
def next = it.next
}
}
- @tailrec override final def run() {
- reader.readLine match {
- case null =>
- reader.close()
- case x =>
- queue put x
- run()
+ override final def run() {
+ @tailrec def loop() {
+ reader.readLine match {
+ case null =>
+ reader.close()
+ case x =>
+ queue put x
+ loop()
+ }
}
+
+ try loop()
+ catch { case _: IOException => () }
}
}