# HG changeset patch # User wenzelm # Date 1197663337 -3600 # Node ID 9036ccd685b4c5aeaeac82339ec3745181341d06 # Parent 98dd706319a1b1b695a87e55d54bc71b3e7d8027 added output protocol specification; PID: always on new line; diff -r 98dd706319a1 -r 9036ccd685b4 src/Pure/Tools/isabelle_process.ML --- a/src/Pure/Tools/isabelle_process.ML Fri Dec 14 21:15:36 2007 +0100 +++ b/src/Pure/Tools/isabelle_process.ML Fri Dec 14 21:15:37 2007 +0100 @@ -3,6 +3,18 @@ Author: Makarius Isabelle process wrapper -- interaction via external program. + +General format of process output: + + (a) unmarked stdout/stderr, no line structure (output should be + processed immediately as it arrives) + + (b) echo of my pid on stdout, appears *relatively* early after + startup on a separate line, e.g. "\nPID=4711\n" + + (c) properly marked-up messages, e.g. for writeln channel + "\002A" ^ text ^ "\002.\n" where the body text may consist of several + lines (output should be processed in one piece). *) signature ISABELLE_PROCESS = @@ -52,7 +64,7 @@ (* init *) fun init () = - (Output.writeln_default ("PID=" ^ string_of_pid (Posix.ProcEnv.getpid ())); + (Output.writeln_default ("\nPID=" ^ string_of_pid (Posix.ProcEnv.getpid ())); setup_channels (); Isar.secure_main ());