src/Pure/ML-Systems/multithreading_polyml.ML
changeset 39576 48baf61cb888
parent 39232 69c6d3e87660
child 39583 c1e9c6dfeff8
equal deleted inserted replaced
39575:c77b9374f45c 39576:48baf61cb888
   178 
   178 
   179     (*system thread*)
   179     (*system thread*)
   180     val system_thread = Thread.fork (fn () =>
   180     val system_thread = Thread.fork (fn () =>
   181       let
   181       let
   182         val status =
   182         val status =
   183           OS.Process.system ("exec \"$ISABELLE_HOME/lib/scripts/bash\" group " ^
   183           OS.Process.system ("exec \"$ISABELLE_HOME/lib/scripts/process\" group " ^ pid_name ^
   184             script_name ^ " " ^ pid_name ^ " " ^ output_name);
   184             " \"exec bash " ^ script_name ^ " > " ^ output_name ^ "\"");
   185         val res =
   185         val res =
   186           (case Posix.Process.fromStatus status of
   186           (case Posix.Process.fromStatus status of
   187             Posix.Process.W_EXITED => Result 0
   187             Posix.Process.W_EXITED => Result 0
   188           | Posix.Process.W_EXITSTATUS 0wx82 => Signal
   188           | Posix.Process.W_EXITSTATUS 0wx82 => Signal
   189           | Posix.Process.W_EXITSTATUS w => Result (Word8.toInt w)
   189           | Posix.Process.W_EXITSTATUS w => Result (Word8.toInt w)