src/Pure/System/isabelle_system.scala
changeset 50715 8cfd585b9162
parent 50684 12b7e0b4a66e
child 50845 477ca927676f
equal deleted inserted replaced
50714:2af9e4614ba4 50715:8cfd585b9162
   173         case path => path.replace('\\', '/')
   173         case path => path.replace('\\', '/')
   174       }
   174       }
   175     }
   175     }
   176     else jvm_path
   176     else jvm_path
   177 
   177 
       
   178   def posix_path(file: JFile): String = posix_path(file.getPath)
       
   179 
   178 
   180 
   179   /* misc path specifications */
   181   /* misc path specifications */
   180 
   182 
   181   def standard_path(path: Path): String = path.expand.implode
   183   def standard_path(path: Path): String = path.expand.implode
   182 
   184 
   331 
   333 
   332   def bash_env(cwd: JFile, env: Map[String, String], script: String): (String, String, Int) =
   334   def bash_env(cwd: JFile, env: Map[String, String], script: String): (String, String, Int) =
   333   {
   335   {
   334     File.with_tmp_file("isabelle_script") { script_file =>
   336     File.with_tmp_file("isabelle_script") { script_file =>
   335       File.write(script_file, script)
   337       File.write(script_file, script)
   336       val proc = new Managed_Process(cwd, env, false, "bash", posix_path(script_file.getPath))
   338       val proc = new Managed_Process(cwd, env, false, "bash", posix_path(script_file))
   337 
   339 
   338       proc.stdin.close
   340       proc.stdin.close
   339       val (_, stdout) = Simple_Thread.future("bash_stdout") { File.read_stream(proc.stdout) }
   341       val (_, stdout) = Simple_Thread.future("bash_stdout") { File.read_stream(proc.stdout) }
   340       val (_, stderr) = Simple_Thread.future("bash_stderr") { File.read_stream(proc.stderr) }
   342       val (_, stderr) = Simple_Thread.future("bash_stderr") { File.read_stream(proc.stderr) }
   341 
   343