# HG changeset patch # User wenzelm # Date 1380624804 -7200 # Node ID 132640f4c4534f887986ae08d6c204fd7b073051 # Parent e13b0c88c7986418dc288b471baa068d2859335d tuned signature -- facilitate experimentation with other processes; diff -r e13b0c88c798 -r 132640f4c453 src/Pure/System/isabelle_process.scala --- a/src/Pure/System/isabelle_process.scala Mon Sep 30 22:01:46 2013 +0900 +++ b/src/Pure/System/isabelle_process.scala Tue Oct 01 12:53:24 2013 +0200 @@ -64,7 +64,7 @@ class Isabelle_Process( receiver: Isabelle_Process.Message => Unit = Console.println(_), - args: List[String] = Nil) + arguments: List[String] = Nil) { import Isabelle_Process._ @@ -126,13 +126,14 @@ /** process manager **/ + def command_line(channel: System_Channel, args: List[String]): List[String] = + Isabelle_System.getenv_strict("ISABELLE_PROCESS") :: (channel.isabelle_args ::: args) + private val system_channel = System_Channel() private val process = try { - val cmdline = - Isabelle_System.getenv_strict("ISABELLE_PROCESS") :: - (system_channel.isabelle_args ::: args) + val cmdline = command_line(system_channel, arguments) new Isabelle_System.Managed_Process(null, null, false, cmdline: _*) } catch { case e: IOException => system_channel.accepted(); throw(e) } diff -r e13b0c88c798 -r 132640f4c453 src/Pure/System/system_channel.scala --- a/src/Pure/System/system_channel.scala Mon Sep 30 22:01:46 2013 +0900 +++ b/src/Pure/System/system_channel.scala Tue Oct 01 12:53:24 2013 +0200 @@ -21,6 +21,7 @@ abstract class System_Channel { + def params: List[String] def isabelle_args: List[String] def rendezvous(): (OutputStream, InputStream) def accepted(): Unit @@ -57,6 +58,8 @@ private val fifo1 = mk_fifo() private val fifo2 = mk_fifo() + def params: List[String] = List(fifo1, fifo2) + val isabelle_args: List[String] = List ("-W", fifo1 + ":" + fifo2) def rendezvous(): (OutputStream, InputStream) = @@ -76,6 +79,8 @@ { private val server = new ServerSocket(0, 2, InetAddress.getByName("127.0.0.1")) + def params: List[String] = List("127.0.0.1", server.getLocalPort.toString) + def isabelle_args: List[String] = List("-T", "127.0.0.1:" + server.getLocalPort) def rendezvous(): (OutputStream, InputStream) =