[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Damien Doligez <Damien.Doligez@i...> |
| Subject: | Re: [Caml-list] Pipes in 3.01 |
>From: Laszlo Nemeth <laszlo@ropas.kaist.ac.kr> > 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