Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Unix.create_process
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Francois Pottier <francois.pottier@i...>
Subject: Re: [Caml-list] Unix.create_process

Hi Rolf,

You need to create a pipe, have the process write into one end of it, and read
data off the other end. The function [Unix.open_process_in] does that for
you. Here is an example:

  let one_liner command =
    let channel = Unix.open_process_in command in
    let line = input_line channel in
    let _ = Unix.close_process_in channel in

François Pottier
Bug reports:  FAQ:
To unsubscribe, mail  Archives: