From: Francois Pottier <francois.pottier@inria.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Unix.create_process
Date: Thu, 20 Dec 2001 16:14:32 +0100 [thread overview]
Message-ID: <20011220161432.A11820@pauillac.inria.fr> (raw)
In-Reply-To: <3C20DDC9.22969.A60E35F@localhost>; from wester@ilt.fhg.de on Wed, Dec 19, 2001 at 06:34:49PM +0200
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
line
;;
--
François Pottier
Francois.Pottier@inria.fr
http://pauillac.inria.fr/~fpottier/
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
prev parent reply other threads:[~2001-12-20 15:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-19 16:34 Rolf Wester
2001-12-20 15:14 ` Francois Pottier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20011220161432.A11820@pauillac.inria.fr \
--to=francois.pottier@inria.fr \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox