Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] calling telnet from a caml program
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Andrei Errapart <andreie@n...>
Subject: Re: [Caml-list] calling telnet from a caml program
On Wed, 6 Nov 2002, Alan Schmitt wrote:
> Hi,
> 
> I've spent a couple hours trying to make this work, but it does not want
> to ... I want to call telnet from a caml program, send some commands,
> and read some output. However there is something weird going on, as
> telnet does not seem to flush anything.

IIRC stdio/stdout use different buffering strategy (line-buffering vs. 
fixed size buffer) depending upon whether isatty(0) is true or false. If 
this is the case, there is nothing you can do to force telnet into 
line-buffering mode except using pseudo-ttys (pty), which is what programs 
like "screen" and "except" do.


Andrei

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners