src/Pure/System/bash.scala
changeset 73896 5d44c6a7bd7b
parent 73895 b709faa96586
child 73897 0ddb5de0506e
equal deleted inserted replaced
73895:b709faa96586 73896:5d44c6a7bd7b
    57       cmd.add("/usr/bin/env")
    57       cmd.add("/usr/bin/env")
    58       cmd.add("bash")
    58       cmd.add("bash")
    59     }
    59     }
    60     cmd.add("-c")
    60     cmd.add("-c")
    61     cmd.add("kill -" + signal + " -" + group_pid)
    61     cmd.add("kill -" + signal + " -" + group_pid)
    62     val (_, rc) = Isabelle_Env.process_output(Isabelle_Env.process(cmd))
    62     Isabelle_Env.exec_process(cmd).ok
    63     rc == 0
       
    64   }
    63   }
    65 
    64 
    66   def process(script: String,
    65   def process(script: String,
    67       cwd: JFile = null,
    66       cwd: JFile = null,
    68       env: Map[String, String] = Isabelle_System.settings(),
    67       env: Map[String, String] = Isabelle_System.settings(),
    93 
    92 
    94     private val script_file: JFile = Isabelle_System.tmp_file("bash_script")
    93     private val script_file: JFile = Isabelle_System.tmp_file("bash_script")
    95     File.write(script_file, winpid_script)
    94     File.write(script_file, winpid_script)
    96 
    95 
    97     private val proc =
    96     private val proc =
    98       Isabelle_Env.process(
    97       Isabelle_Env.process_builder(
    99         JList.of(File.platform_path(Path.variable("ISABELLE_BASH_PROCESS")),
    98         JList.of(File.platform_path(Path.variable("ISABELLE_BASH_PROCESS")),
   100           File.standard_path(timing_file), "bash", File.standard_path(script_file)),
    99           File.standard_path(timing_file), "bash", File.standard_path(script_file)),
   101         cwd = cwd, env = env, redirect = redirect)
   100         cwd = cwd, env = env, redirect = redirect).start()
   102 
   101 
   103 
   102 
   104     // channels
   103     // channels
   105 
   104 
   106     val stdin: BufferedWriter =
   105     val stdin: BufferedWriter =