equal
deleted
inserted
replaced
65 fun setup_channels out = |
65 fun setup_channels out = |
66 let |
66 let |
67 val path = File.platform_path (Path.explode out); |
67 val path = File.platform_path (Path.explode out); |
68 val out_stream = TextIO.openOut path; (*fifo blocks until reader is ready*) |
68 val out_stream = TextIO.openOut path; (*fifo blocks until reader is ready*) |
69 val _ = OS.FileSys.remove path; (*prevent alien access, indicate writer is ready*) |
69 val _ = OS.FileSys.remove path; (*prevent alien access, indicate writer is ready*) |
70 val _ = SimpleThread.fork false (auto_flush out_stream); |
70 val _ = Simple_Thread.fork false (auto_flush out_stream); |
71 val _ = SimpleThread.fork false (auto_flush TextIO.stdOut); |
71 val _ = Simple_Thread.fork false (auto_flush TextIO.stdOut); |
72 val _ = SimpleThread.fork false (auto_flush TextIO.stdErr); |
72 val _ = Simple_Thread.fork false (auto_flush TextIO.stdErr); |
73 in |
73 in |
74 Output.status_fn := standard_message out_stream "B"; |
74 Output.status_fn := standard_message out_stream "B"; |
75 Output.writeln_fn := standard_message out_stream "C"; |
75 Output.writeln_fn := standard_message out_stream "C"; |
76 Output.tracing_fn := standard_message out_stream "D"; |
76 Output.tracing_fn := standard_message out_stream "D"; |
77 Output.warning_fn := standard_message out_stream "E"; |
77 Output.warning_fn := standard_message out_stream "E"; |