src/Pure/ML-Systems/smlnj-0.93.ML
changeset 4494 7e5611945959
parent 4428 5c26253b8a2e
child 4506 f21ec26b2265
equal deleted inserted replaced
4493:26511042ce07 4494:7e5611945959
    88 (*execute Unix command which doesn't take any input from stdin and
    88 (*execute Unix command which doesn't take any input from stdin and
    89   sends its output to stdout; could be done more easily by IO.execute,
    89   sends its output to stdout; could be done more easily by IO.execute,
    90   but that function seems to be buggy in SML/NJ 0.93*)
    90   but that function seems to be buggy in SML/NJ 0.93*)
    91 fun execute command =
    91 fun execute command =
    92   let
    92   let
    93     val tmp_name = getenv "$ISABELLE_TMP" ^ "/isabelle-execute";
    93     val tmp_name = "/tmp/isabelle-execute";
    94     val is = (System.system (command ^ " > " ^ tmp_name); open_in tmp_name);
    94     val is = (System.system (command ^ " > " ^ tmp_name); open_in tmp_name);
    95     val result = input (is, 999999);
    95     val result = input (is, 999999);
    96   in
    96   in
    97     close_in is;
    97     close_in is;
    98     System.Unsafe.SysIO.unlink tmp_name;
    98     System.Unsafe.SysIO.unlink tmp_name;