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 NAA29578; Fri, 30 Mar 2001 13:33:54 +0200 (MET DST) 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 NAA29682 for ; Fri, 30 Mar 2001 13:33:54 +0200 (MET DST) Received: from beaune.inria.fr (beaune.inria.fr [128.93.8.3]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f2UBXrX00647 for ; Fri, 30 Mar 2001 13:33:53 +0200 (MET DST) Received: by beaune.inria.fr (8.8.8/1.1.22.3/14Sep99-0328PM) id NAA0000003563; Fri, 30 Mar 2001 13:33:53 +0200 (MET DST) Date: Fri, 30 Mar 2001 13:33:53 +0200 (MET DST) From: Damien Doligez Message-Id: <200103301133.NAA0000003563@beaune.inria.fr> To: caml-list@inria.fr, laszlo@ropas.kaist.ac.kr Subject: Re: [Caml-list] Pipes in 3.01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk >From: Laszlo Nemeth > let (dIn, dOut) = Unix.pipe () in You're creating one pipe. > let dProcess = Unix.create_process "daVinci" > [| "-pipe" |] > ~stdin:dIn > ~stdout:dOut > ~stderr:Unix.stderr You're piping the output of daVinci into its own input. > let len = Unix.read dIn ~buf ~pos:0 100 in You're competing with daVinci on reading its output >On the other hand, if I start up daVinci in a shell (with >-pipe) it immediately sends back the string ok. I guess it does the same here, but it reads back the "ok" before you do, then it waits for some more input. If you want to send some input to daVinci AND get back its output, you will need to create two pipes. -- Damien ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr