Now uses fd 0 instead of trying to explicitly open /dev/tty.
authordtrg <none@none>
Tue, 20 Feb 2007 00:38:13 +0000 (00:38 +0000)
committerdtrg <none@none>
Tue, 20 Feb 2007 00:38:13 +0000 (00:38 +0000)
lang/m2/libm2/Terminal.mod

index e505aa9..120aba7 100644 (file)
@@ -108,7 +108,13 @@ IMPLEMENTATION MODULE Terminal;
   END WriteString;
 
 BEGIN
+(*
        tty := "/dev/tty";
        fildes := open(ADR(tty), 2);
        unread := FALSE;
+*)
+(* dtrg: changed so that instead of opening /dev/tty, fd 0 is always used. *)
+    tty := "stdio";
+    fildes := 0;
+    unread := FALSE;
 END Terminal.