English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2002-11-06 (16:25)
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 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