more robust Isabelle_System.rm_fifo: avoid external bash invocation, which might not work in JVM shutdown phase (due to Runtime.addShutdownHook);
authorwenzelm
Mon, 20 Sep 2010 21:54:58 +0200
changeset 39574 91b23d141dbf
parent 39573 a874ca3f5474
child 39575 c77b9374f45c
more robust Isabelle_System.rm_fifo: avoid external bash invocation, which might not work in JVM shutdown phase (due to Runtime.addShutdownHook);
src/Pure/System/isabelle_system.scala
--- a/src/Pure/System/isabelle_system.scala	Mon Sep 20 21:26:58 2010 +0200
+++ b/src/Pure/System/isabelle_system.scala	Mon Sep 20 21:54:58 2010 +0200
@@ -292,10 +292,8 @@
     else error(result)
   }
 
-  def rm_fifo(fifo: String)
-  {
-    bash_output("rm -f '" + fifo + "'")
-  }
+  def rm_fifo(fifo: String): Boolean =
+    (new File(jvm_path(if (Platform.is_windows) fifo + ".lnk" else fifo))).delete
 
   def fifo_input_stream(fifo: String): InputStream =
   {