src/Pure/System/isabelle_system.scala
changeset 61025 636b578bfadd
parent 60992 89effcb342df
child 61281 11c1bf92d61d
--- a/src/Pure/System/isabelle_system.scala	Tue Aug 25 16:49:14 2015 +0200
+++ b/src/Pure/System/isabelle_system.scala	Wed Aug 26 13:43:24 2015 +0200
@@ -290,6 +290,18 @@
   }
 
 
+  /* kill */
+
+  def kill(signal: String, group_pid: String): (String, Int) =
+  {
+    val bash =
+      if (Platform.is_windows) List(get_cygwin_root() + "\\bin\\bash.exe")
+      else List("/usr/bin/env", "bash")
+    val cmdline = bash ::: List("-c", "kill -" + signal + " -" + group_pid)
+    process_output(raw_execute(null, null, true, cmdline: _*))
+  }
+
+
   /* bash */
 
   private class Limited_Progress(proc: Bash.Process, progress_limit: Option[Long])