Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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.


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: