From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA20185; Wed, 6 Nov 2002 17:25:06 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA20204 for ; Wed, 6 Nov 2002 17:25:05 +0100 (MET) Received: from no.spam.ee (no.spam.ee [195.222.11.138]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id gA6GP4506550 for ; Wed, 6 Nov 2002 17:25:04 +0100 (MET) Received: from no.spam.ee (localhost [127.0.0.1]) by no.spam.ee (8.12.5/8.12.5) with ESMTP id gA6GQTGw025481 for ; Wed, 6 Nov 2002 18:26:29 +0200 Received: from localhost (andreie@localhost) by no.spam.ee (8.12.5/8.12.5/Submit) with ESMTP id gA6GQS4l025477 for ; Wed, 6 Nov 2002 18:26:28 +0200 Date: Wed, 6 Nov 2002 18:26:28 +0200 (EET) From: Andrei Errapart To: caml-list@inria.fr Subject: Re: [Caml-list] calling telnet from a caml program In-Reply-To: <20021106161155.GD3396@alan-schm1p> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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