Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /sml/trunk/src/cml/src/tests/test.sml
ViewVC logotype

View of /sml/trunk/src/cml/src/tests/test.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 651 - (download) (annotate)
Thu Jun 1 18:34:03 2000 UTC (19 years, 3 months ago) by monnier
File size: 468 byte(s)
bring revisions from the vendor branch to the trunk
structure Test = 
struct

  val prog = "/bin/ls"

  fun doit () = let
	val proc = Unix.execute(prog, [])
	val (fin,fout) = Unix.streamsOf proc
	fun echo () = (case TextIO.inputLine fin
	       of "" => ()
		| s => (TextIO.output(TextIO.stdOut, s); echo())
	      (* end case *))
        in
	  TextIO.closeOut fout;
	  echo ();
	  TextIO.closeIn fin;
	  ignore(Unix.reap proc);
	  ()
        end

  fun run () = RunCML.doit(doit, SOME(Time.fromMilliseconds 100))

end


root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0