From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id C6043BC48 for ; Tue, 5 Apr 2005 15:39:20 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j35DdK8N000568 for ; Tue, 5 Apr 2005 15:39:20 +0200 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA30654 for ; Tue, 5 Apr 2005 15:39:20 +0200 (MET DST) Received: from saul.cis.upenn.edu (SAUL.CIS.upenn.edu [158.130.12.4]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j35DdIcZ000563 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Tue, 5 Apr 2005 15:39:19 +0200 Received: from localhost (localhost [127.0.0.1]) by saul.cis.upenn.edu (8.12.10/8.12.9) with ESMTP id j35DdHCP015857; Tue, 5 Apr 2005 09:39:17 -0400 (EDT) Date: Tue, 05 Apr 2005 09:39:14 -0400 (EDT) Message-Id: <20050405.093914.125114830.eijiro_sumii@anet.ne.jp> To: caml-list@inria.fr Cc: sumii@saul.cis.upenn.edu Subject: Re: [Caml-list] select (or polling) on in_channel? From: Eijiro Sumii In-Reply-To: <20050405070028.43956.qmail@web41905.mail.yahoo.com> References: <20050405070028.43956.qmail@web41905.mail.yahoo.com> X-Mailer: Mew version 3.2 on Emacs 20.7 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Miltered: at nez-perce with ID 42529508.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 42529506.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 eijiro:01 sumii:01 eijiro:01 sumii:01 evry:01 unix:01 unix:01 anet:02 let:03 let:03 complex:04 i'd:05 channel:06 function:08 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: From: "sejourne kevin" > I'not sure of what you want, but does this do the job? > let syst=E8me command f_line =3D = > let cin =3D Unix.open_process_in command > in = > (try while true do > f_line (input_line cin); > done with | End_of_file -> ()); > Unix.close_process_in cin > ;; > It is just a function that give to 'f_line' evry = > lines produced by a pipe by the 'command'. No, unfortunately, since it cannot time out when no input is available. Also, I have to write the network communication as a separate process, which is more complex than using select. My previous messages give more details on what I'd like to do. Eijiro