src/Pure/System/ml_process.scala
changeset 62547 b33dea503665
parent 62546 973b12bccbc5
child 62548 f8ebb715e06d
equal deleted inserted replaced
62546:973b12bccbc5 62547:b33dea503665
    48         List(
    48         List(
    49           if (Platform.is_windows)
    49           if (Platform.is_windows)
    50             "fun exit 0 = OS.Process.exit OS.Process.success" +
    50             "fun exit 0 = OS.Process.exit OS.Process.success" +
    51             " | exit 1 = OS.Process.exit OS.Process.failure" +
    51             " | exit 1 = OS.Process.exit OS.Process.failure" +
    52             " | exit rc = OS.Process.exit (RunCall.unsafeCast (Word8.fromInt rc))"
    52             " | exit rc = OS.Process.exit (RunCall.unsafeCast (Word8.fromInt rc))"
    53           else
    53           else "fun exit rc = Posix.Process.exit (Word8.fromInt rc)",
    54             "fun exit rc = Posix.Process.exit (Word8.fromInt rc)"
    54           "PolyML.print_depth 10")
    55         )
       
    56       }
    55       }
    57       else Nil
    56       else Nil
    58 
    57 
    59     val eval_secure = if (secure) List("Secure.set_secure ()") else Nil
    58     val eval_secure = if (secure) List("Secure.set_secure ()") else Nil
    60 
    59 
    65 
    64 
    66     // options
    65     // options
    67     val isabelle_process_options = Isabelle_System.tmp_file("options")
    66     val isabelle_process_options = Isabelle_System.tmp_file("options")
    68     File.write(isabelle_process_options, YXML.string_of_body(options.encode))
    67     File.write(isabelle_process_options, YXML.string_of_body(options.encode))
    69     val env = Map("ISABELLE_PROCESS_OPTIONS" -> File.standard_path(isabelle_process_options))
    68     val env = Map("ISABELLE_PROCESS_OPTIONS" -> File.standard_path(isabelle_process_options))
    70     val eval_options = List("Options.load_default ()")
    69     val eval_options = if (load_heaps.isEmpty) Nil else List("Options.load_default ()")
    71 
    70 
    72     val eval_process =
    71     val eval_process =
    73       if (process_socket == "") Nil
    72       if (process_socket == "") Nil
    74       else List("Isabelle_Process.init " + ML_Syntax.print_string_raw(process_socket))
    73       else List("Isabelle_Process.init " + ML_Syntax.print_string_raw(process_socket))
    75 
    74