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: Alan Schmitt <alan.schmitt@p...>
Subject: Re: [Caml-list] calling telnet from a caml program
* Andrei Errapart ( wrote:
> 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.

That's what I was afraid of ... So on to the next question: is it
possible to use pseudy-ttys with caml ? Or should I start thinking about
reimplementing the telnet client protocol ...


The hacker: someone who figured things out and made something cool happen.
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: