English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Re: [Caml-list] Pipes in 3.01
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-03-31 (02:12)
From: Laszlo Nemeth <laszlo@r...>
Subject: Re: [Caml-list] Pipes in 3.01
Thanks for all those (Damien, Francois, Fabrice) who replied and
pointed out my misunderstanding of IPC. Nevertheless, I did not manage
to make it work with 'create_process'. Instead, I started using
'open_process' which works wonderfully.

Thanks again. Laszlo

--- the working snippet:
module DaVinciAPI : DAVINCIAPI =
    exception DaVinciInitError
    let daVinci () =
      begin try
        let (dIn, dOut) = Unix.open_process "daVinci -pipe" 
        and buf = String.create 10 in
        let len = Unix.read (Unix.descr_of_in_channel dIn) ~buf ~pos:0 10
      with Unix.Unix_error _ -> raise DaVinciInitError

To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr