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 RAA20766; Wed, 6 Nov 2002 17:35:05 +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 RAA20989 for ; Wed, 6 Nov 2002 17:35:04 +0100 (MET) Received: from alan-schm1p.inria.fr (DHCP12-10.CIS.UPENN.EDU [158.130.13.30]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id gA6GZ3507478 for ; Wed, 6 Nov 2002 17:35:04 +0100 (MET) Received: by alan-schm1p.inria.fr (Postfix, from userid 501) id DCAB944BD; Wed, 6 Nov 2002 11:34:46 -0500 (EST) Date: Wed, 6 Nov 2002 11:34:46 -0500 From: Alan Schmitt To: caml-list@inria.fr Subject: Re: [Caml-list] calling telnet from a caml program Message-ID: <20021106163446.GI3396@alan-schm1p> Mail-Followup-To: caml-list@inria.fr References: <20021106161155.GD3396@alan-schm1p> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i X-Editor: Vim http://vim.sf.net/ X-Info: http://pauillac.inria.fr/~aschmitt/ X-Operating-System: Linux/2.4.19-18mdk (i686) X-Uptime: 11:33am up 3:08, 1 user, load average: 0.06, 0.08, 0.02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk * Andrei Errapart (andreie@no.spam.ee) 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 ... Alan -- The hacker: someone who figured things out and made something cool happen. ------------------- 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