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

SCM Repository

[smlnj] Annotation of /tests/trunk/bugs/tests.obsolete/bug342.sml
ViewVC logotype

Annotation of /tests/trunk/bugs/tests.obsolete/bug342.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2071 - (view) (download)
Original Path: tests/trunk/bugs/tests/bug342.sml

1 : dbm 548 (* bug 342 -- should return display name
2 :     * Note: this also tests for #413, #424 and #432.
3 :     *)
4 :    
5 :     let val proc1 = Unix.execute ("/bin/sh", []); (* to avoid print PID *)
6 :     val (istr,ostr) = Unix.streamsOf proc1;
7 :     in TextIO.output(ostr,"echo '>'$HOME'<'\n");
8 :     TextIO.closeOut ostr;
9 :     TextIO.inputLine istr;
10 :     TextIO.closeIn istr
11 :     end;
12 :    
13 :     let val proc2 = Unix.executeInEnv ("/bin/sh", [], ["DISPLAY=foo"]);
14 :     val (istr,ostr) = Unix.streamsOf proc2;
15 :     in TextIO.output(ostr, "echo '>'$DISPLAY'<'\n");
16 :     TextIO.closeOut ostr;
17 :     TextIO.inputLine istr
18 :     end;

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