[gambit-list] Strange echo in pseudo-terminals on MacOSX10.4 Gambit-Cb14

Francois Magnan magnan at licef.teluq.uquebec.ca
Mon Aug 8 15:22:46 EDT 2005


Me again... I just separated my questions to different threads...

There is strange echo I get by communicating with a pseudo terminal  
process on MacOSX 10.4 Gambit-Cb14.
I open a dummy process that is a pseudo-terminal using the open- 
process command and when I send data to the port that data gets  
repeated in the pseudo-terminal output-port. See the example below  
for better clarity. Can I turn off that echo?

I cannot test it on the WinXP platform since open-process is not  
implemented for (MinGW or Cygwin).

Thank you,
Francois Magnan


; Pseudo-terminal program

(define (command-loop)
   (let ((command (read-line)))
     (serve-command command)

(define (serve-command command)
   (pp (list "got command" command)))


; build the above to an executable file called "/tmp/pttest" using  
gsc and gcc.


(define (test-pseudo-terminal)
   (let ((port (open-process (list
                              path: "/tmp/pttest"
                              stderr-redirection: #t
                              pseudo-terminal: #t ))))
     ;(force-output port)
     (pp port)
     (thread-sleep! 1)
     (display "toto\n" port)
     (force-output port)
     (pp (read-line port))
     (pp (read-line port))
     (close-port port)))


; execute the above in a gsi interpreter
; On MacOSX 10.4 I get
; "\33[1mtoto\33[m"
;"(\"got command\" \"toto\")"

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20050808/b03ff124/attachment.html

More information about the Gambit-list mailing list