src/Pure/System/isabelle_system.scala
changeset 55555 9c16317c91d1
parent 54880 ce5faf131fd3
child 55618 995162143ef4
equal deleted inserted replaced
55554:d77090e07000 55555:9c16317c91d1
   265   /* plain execute */
   265   /* plain execute */
   266 
   266 
   267   def execute_env(cwd: JFile, env: Map[String, String], redirect: Boolean, args: String*): Process =
   267   def execute_env(cwd: JFile, env: Map[String, String], redirect: Boolean, args: String*): Process =
   268   {
   268   {
   269     val cmdline =
   269     val cmdline =
   270       if (Platform.is_windows) List(get_cygwin_root() + "\\bin\\env.exe") ++ args
   270       if (Platform.is_windows) List(get_cygwin_root() + "\\bin\\env.exe") ::: args.toList
   271       else args
   271       else args
   272     val env1 = if (env == null) settings else settings ++ env
   272     val env1 = if (env == null) settings else settings ++ env
   273     raw_execute(cwd, env1, redirect, cmdline: _*)
   273     raw_execute(cwd, env1, redirect, cmdline: _*)
   274   }
   274   }
   275 
   275 
   281 
   281 
   282   class Managed_Process(cwd: JFile, env: Map[String, String], redirect: Boolean, args: String*)
   282   class Managed_Process(cwd: JFile, env: Map[String, String], redirect: Boolean, args: String*)
   283   {
   283   {
   284     private val params =
   284     private val params =
   285       List(standard_path(Path.explode("~~/lib/scripts/process")), "group", "-", "no_script")
   285       List(standard_path(Path.explode("~~/lib/scripts/process")), "group", "-", "no_script")
   286     private val proc = execute_env(cwd, env, redirect, (params ++ args):_*)
   286     private val proc = execute_env(cwd, env, redirect, (params ::: args.toList):_*)
   287 
   287 
   288 
   288 
   289     // channels
   289     // channels
   290 
   290 
   291     val stdin: BufferedWriter =
   291     val stdin: BufferedWriter =
   412       }
   412       }
   413       catch { case _: SecurityException => false }
   413       catch { case _: SecurityException => false }
   414     } match {
   414     } match {
   415       case Some(dir) =>
   415       case Some(dir) =>
   416         val file = standard_path(dir + Path.basic(name))
   416         val file = standard_path(dir + Path.basic(name))
   417         process_output(execute(true, (List(file) ++ args): _*))
   417         process_output(execute(true, (List(file) ::: args.toList): _*))
   418       case None => ("Unknown Isabelle tool: " + name, 2)
   418       case None => ("Unknown Isabelle tool: " + name, 2)
   419     }
   419     }
   420   }
   420   }
   421 
   421 
   422   def open(arg: String): Unit =
   422   def open(arg: String): Unit =