removed General/system_process.ML (back to multithreaded version);
authorwenzelm
Tue, 19 Feb 2008 20:34:29 +0100
changeset 26097 943582a2d1e2
parent 26096 783f957dcb01
child 26098 b59d33f73aed
removed General/system_process.ML (back to multithreaded version);
src/Pure/General/ROOT.ML
src/Pure/General/system_process.ML
src/Pure/IsaMakefile
--- a/src/Pure/General/ROOT.ML	Tue Feb 19 20:34:28 2008 +0100
+++ b/src/Pure/General/ROOT.ML	Tue Feb 19 20:34:29 2008 +0100
@@ -32,5 +32,4 @@
 use "buffer.ML";
 use "history.ML";
 use "xml.ML";
-use "system_process.ML";
 
--- a/src/Pure/General/system_process.ML	Tue Feb 19 20:34:28 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-(*  Title:      Pure/General/system_process.ML
-    ID:         $Id$
-    Author:     Makarius
-
-System shell processes, with static input/output and propagation of interrupts.
-*)
-
-signature SYSTEM_PROCESS =
-sig
-  val system_out: string -> string * int
-  val system: string -> int
-end;
-
-structure SystemProcess: SYSTEM_PROCESS =
-struct
-
-fun system_out script = uninterruptible (fn restore_attributes => fn () =>
-  let
-    val _ = Secure.deny_secure "Cannot execute shell commands in secure mode";
-
-    val script_file = OS.FileSys.tmpName ();
-    val _ = File.write (Path.explode script_file) script;
-
-    val perl_file = OS.FileSys.tmpName ();
-    val _ = File.write (Path.explode perl_file)  (*robust signal handling via perl*)
-      ("$SIG{'INT'} = 'DEFAULT'; exec '/bin/bash --norc " ^ script_file ^ "' || die $!;");
-
-    val proc = Unix.execute ("/usr/bin/env", ["perl", "-w", perl_file]);
-    val (proc_stdout, proc_stdin) = Unix.streamsOf proc;
-
-    fun read buf =
-      (case Exn.capture (restore_attributes TextIO.input) proc_stdout of
-        Exn.Exn Interrupt => (Unix.kill (proc, Posix.Signal.int); read buf)
-      | Exn.Exn _ => buf
-      | Exn.Result "" => buf
-      | Exn.Result txt => read (Buffer.add txt buf));
-
-    val output = read Buffer.empty;
-    val status = Unix.reap proc;
-    val rc = Unix.fromStatus status;
-
-    val _ = OS.FileSys.remove script_file;
-    val _ = OS.FileSys.remove perl_file;
-  in
-    if rc = Unix.W_SIGNALED Posix.Signal.int orelse rc = Unix.W_EXITSTATUS 0wx82
-    then raise Interrupt
-    else (Buffer.content output, if OS.Process.isSuccess status then 0 else 1)
-  end) ();
-
-fun system script =
-  let val (output, status) = system_out script in writeln output; status end;
-
-end;
-
--- a/src/Pure/IsaMakefile	Tue Feb 19 20:34:28 2008 +0100
+++ b/src/Pure/IsaMakefile	Tue Feb 19 20:34:29 2008 +0100
@@ -24,58 +24,59 @@
 Pure: $(OUT)/Pure$(ML_SUFFIX)
 
 $(OUT)/Pure$(ML_SUFFIX): \
-  CPure.thy General/ROOT.ML General/alist.ML General/balanced_tree.ML		\
-  General/basics.ML General/buffer.ML General/file.ML General/graph.ML		\
-  General/heap.ML General/history.ML General/integer.ML				\
-  General/markup.ML General/name_space.ML General/ord_list.ML			\
-  General/output.ML General/path.ML General/position.ML				\
-  General/pretty.ML General/print_mode.ML General/scan.ML			\
-  General/secure.ML General/seq.ML General/source.ML General/stack.ML		\
-  General/system_process.ML General/susp.ML General/symbol.ML General/table.ML	\
-  General/url.ML General/xml.ML Isar/ROOT.ML Isar/antiquote.ML Isar/args.ML	\
-  Isar/attrib.ML Isar/auto_bind.ML Isar/calculation.ML Isar/class.ML		\
-  Isar/code.ML Isar/code_unit.ML Isar/constdefs.ML Isar/context_rules.ML	\
-  Isar/element.ML Isar/find_theorems.ML Isar/instance.ML			\
-  Isar/isar_cmd.ML Isar/isar_syn.ML Isar/local_defs.ML				\
-  Isar/local_syntax.ML Isar/local_theory.ML Isar/locale.ML			\
-  Isar/method.ML Isar/net_rules.ML Isar/object_logic.ML Isar/obtain.ML		\
-  Isar/outer_keyword.ML Isar/outer_lex.ML Isar/outer_parse.ML			\
-  Isar/outer_syntax.ML Isar/proof.ML Isar/proof_context.ML			\
-  Isar/proof_display.ML Isar/proof_history.ML Isar/rule_cases.ML		\
-  Isar/rule_insts.ML Isar/session.ML Isar/skip_proof.ML				\
-  Isar/spec_parse.ML Isar/specification.ML Isar/subclass.ML			\
-  Isar/theory_target.ML Isar/toplevel.ML ML-Systems/alice.ML			\
-  ML-Systems/exn.ML ML-Systems/multithreading.ML				\
-  ML-Systems/multithreading_polyml.ML ML-Systems/overloading_smlnj.ML		\
-  ML-Systems/polyml-4.1.3.ML ML-Systems/polyml-4.1.4.ML				\
-  ML-Systems/polyml-5.0.ML ML-Systems/polyml-5.1.ML				\
-  ML-Systems/polyml-old-basis.ML ML-Systems/polyml-posix.ML			\
-  ML-Systems/polyml.ML ML-Systems/poplogml.ML ML-Systems/proper_int.ML		\
-  ML-Systems/smlnj.ML ML-Systems/time_limit.ML ML-Systems/universal.ML		\
-  ML/ml_context.ML ML/ml_lex.ML ML/ml_parse.ML ML/ml_syntax.ML			\
-  Proof/extraction.ML Proof/proof_rewrite_rules.ML Proof/proof_syntax.ML	\
-  Proof/proofchecker.ML Proof/reconstruct.ML ProofGeneral/ROOT.ML		\
-  ProofGeneral/pgip.ML ProofGeneral/pgip_input.ML				\
-  ProofGeneral/pgip_isabelle.ML ProofGeneral/pgip_markup.ML			\
-  ProofGeneral/pgip_output.ML ProofGeneral/pgip_parser.ML			\
-  ProofGeneral/pgip_tests.ML ProofGeneral/pgip_types.ML				\
-  ProofGeneral/pgml_isabelle.ML ProofGeneral/preferences.ML			\
-  ProofGeneral/proof_general_emacs.ML ProofGeneral/proof_general_pgip.ML	\
-  Pure.thy ROOT.ML Syntax/ast.ML Syntax/lexicon.ML Syntax/mixfix.ML		\
-  Syntax/parser.ML Syntax/printer.ML Syntax/simple_syntax.ML			\
-  Syntax/syn_ext.ML Syntax/syn_trans.ML Syntax/syntax.ML			\
-  Syntax/type_ext.ML Thy/html.ML Thy/latex.ML Thy/present.ML			\
-  Thy/term_style.ML Thy/thm_database.ML Thy/thm_deps.ML Thy/thy_edit.ML		\
-  Thy/thy_header.ML Thy/thy_info.ML Thy/thy_load.ML Thy/thy_output.ML		\
-  Tools/ROOT.ML Tools/invoke.ML Tools/isabelle_process.ML			\
-  Tools/named_thms.ML Tools/xml_syntax.ML assumption.ML axclass.ML		\
-  codegen.ML compress.ML config.ML conjunction.ML consts.ML context.ML		\
-  conv.ML defs.ML display.ML drule.ML envir.ML fact_index.ML goal.ML		\
-  interpretation.ML library.ML logic.ML meta_simplifier.ML more_thm.ML		\
-  morphism.ML name.ML net.ML old_goals.ML pattern.ML primitive_defs.ML		\
-  proofterm.ML pure_setup.ML pure_thy.ML search.ML sign.ML simplifier.ML	\
-  sorts.ML subgoal.ML tactic.ML tctical.ML term.ML term_subst.ML theory.ML	\
-  thm.ML type.ML type_infer.ML unify.ML variable.ML
+  CPure.thy General/ROOT.ML General/alist.ML General/balanced_tree.ML	\
+  General/basics.ML General/buffer.ML General/file.ML General/graph.ML	\
+  General/heap.ML General/history.ML General/integer.ML			\
+  General/markup.ML General/name_space.ML General/ord_list.ML		\
+  General/output.ML General/path.ML General/position.ML			\
+  General/pretty.ML General/print_mode.ML General/scan.ML		\
+  General/secure.ML General/seq.ML General/source.ML General/stack.ML	\
+  General/susp.ML General/symbol.ML General/table.ML General/url.ML	\
+  General/xml.ML Isar/ROOT.ML Isar/antiquote.ML Isar/args.ML		\
+  Isar/attrib.ML Isar/auto_bind.ML Isar/calculation.ML Isar/class.ML	\
+  Isar/code.ML Isar/code_unit.ML Isar/constdefs.ML			\
+  Isar/context_rules.ML Isar/element.ML Isar/find_theorems.ML		\
+  Isar/instance.ML Isar/isar_cmd.ML Isar/isar_syn.ML			\
+  Isar/local_defs.ML Isar/local_syntax.ML Isar/local_theory.ML		\
+  Isar/locale.ML Isar/method.ML Isar/net_rules.ML Isar/object_logic.ML	\
+  Isar/obtain.ML Isar/outer_keyword.ML Isar/outer_lex.ML		\
+  Isar/outer_parse.ML Isar/outer_syntax.ML Isar/proof.ML		\
+  Isar/proof_context.ML Isar/proof_display.ML Isar/proof_history.ML	\
+  Isar/rule_cases.ML Isar/rule_insts.ML Isar/session.ML			\
+  Isar/skip_proof.ML Isar/spec_parse.ML Isar/specification.ML		\
+  Isar/subclass.ML Isar/theory_target.ML Isar/toplevel.ML		\
+  ML-Systems/alice.ML ML-Systems/exn.ML ML-Systems/multithreading.ML	\
+  ML-Systems/multithreading_polyml.ML ML-Systems/overloading_smlnj.ML	\
+  ML-Systems/polyml-4.1.3.ML ML-Systems/polyml-4.1.4.ML			\
+  ML-Systems/polyml-5.0.ML ML-Systems/polyml-5.1.ML			\
+  ML-Systems/polyml-old-basis.ML ML-Systems/polyml-posix.ML		\
+  ML-Systems/polyml.ML ML-Systems/poplogml.ML ML-Systems/proper_int.ML	\
+  ML-Systems/smlnj.ML ML-Systems/time_limit.ML ML-Systems/universal.ML	\
+  ML/ml_context.ML ML/ml_lex.ML ML/ml_parse.ML ML/ml_syntax.ML		\
+  Proof/extraction.ML Proof/proof_rewrite_rules.ML			\
+  Proof/proof_syntax.ML Proof/proofchecker.ML Proof/reconstruct.ML	\
+  ProofGeneral/ROOT.ML ProofGeneral/pgip.ML ProofGeneral/pgip_input.ML	\
+  ProofGeneral/pgip_isabelle.ML ProofGeneral/pgip_markup.ML		\
+  ProofGeneral/pgip_output.ML ProofGeneral/pgip_parser.ML		\
+  ProofGeneral/pgip_tests.ML ProofGeneral/pgip_types.ML			\
+  ProofGeneral/pgml_isabelle.ML ProofGeneral/preferences.ML		\
+  ProofGeneral/proof_general_emacs.ML					\
+  ProofGeneral/proof_general_pgip.ML Pure.thy ROOT.ML Syntax/ast.ML	\
+  Syntax/lexicon.ML Syntax/mixfix.ML Syntax/parser.ML			\
+  Syntax/printer.ML Syntax/simple_syntax.ML Syntax/syn_ext.ML		\
+  Syntax/syn_trans.ML Syntax/syntax.ML Syntax/type_ext.ML Thy/html.ML	\
+  Thy/latex.ML Thy/present.ML Thy/term_style.ML Thy/thm_database.ML	\
+  Thy/thm_deps.ML Thy/thy_edit.ML Thy/thy_header.ML Thy/thy_info.ML	\
+  Thy/thy_load.ML Thy/thy_output.ML Tools/ROOT.ML Tools/invoke.ML	\
+  Tools/isabelle_process.ML Tools/named_thms.ML Tools/xml_syntax.ML	\
+  assumption.ML axclass.ML codegen.ML compress.ML config.ML		\
+  conjunction.ML consts.ML context.ML conv.ML defs.ML display.ML	\
+  drule.ML envir.ML fact_index.ML goal.ML interpretation.ML library.ML	\
+  logic.ML meta_simplifier.ML more_thm.ML morphism.ML name.ML net.ML	\
+  old_goals.ML pattern.ML primitive_defs.ML proofterm.ML pure_setup.ML	\
+  pure_thy.ML search.ML sign.ML simplifier.ML sorts.ML subgoal.ML	\
+  tactic.ML tctical.ML term.ML term_subst.ML theory.ML thm.ML type.ML	\
+  type_infer.ML unify.ML variable.ML
 	@./mk