NonPositionableExternalStream.st
changeset 23779 123904e24d2a
parent 23503 4c61c48be58c
child 23901 f6e98ee5be18
--- a/NonPositionableExternalStream.st	Wed Feb 27 15:38:44 2019 +0100
+++ b/NonPositionableExternalStream.st	Wed Feb 27 21:47:55 2019 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
@@ -181,6 +179,7 @@
 makePTYPair
     "return an array with two streams - the first one is the master,
      the second the slave of a ptym/ptys pair.
+     (actually, there is a third element, which is the slave-pty's name)
      This is much like a bidirectional pipe, but allows signals &
      control chars to be passed through the connection.
      This is needed to execute a shell in a view.
@@ -191,11 +190,14 @@
 
     "/ must protect from being unwound, otherwise the pipe-FD might not be registered for finalization
     [
-        ptyPair := OperatingSystem makePTYPair.
+        ptyPair := OperatingSystem makePTY.
         ptyPair notNil ifTrue:[
-            master := PipeStream forReadWriteToFileDescriptor:(ptyPair at:1).
-            master buffered:false.
-            slave := PipeStream forReadWriteToFileDescriptor:(ptyPair at:2).
+            master := PipeStream 
+                        forFileDescriptor:(ptyPair at:1) mode:#readWrite
+                        buffered:false handleType:nil.
+            slave := PipeStream 
+                        forFileDescriptor:(ptyPair at:2) mode:#readWrite
+                        buffered:false handleType:nil.
             slave buffered:false.
             ptyPair at:1 put:master.
             ptyPair at:2 put:slave.
@@ -208,7 +210,7 @@
     "
 
     "Modified: / 29-02-1996 / 18:28:36 / cg"
-    "Modified: / 04-11-2018 / 11:18:33 / Claus Gittinger"
+    "Modified (comment): / 27-02-2019 / 18:49:46 / Claus Gittinger"
 !
 
 makePipe