From: Johann Spies <jhspies@adept.co.za>
To: caml-list@inria.fr
Subject: exec?
Date: Sun, 14 Jan 2001 15:26:38 +0200 [thread overview]
Message-ID: <20010114152638.A2804@adept.co.za> (raw)
I am a newbie learning ocaml. In a demo using
libpq_ocaml I found a command 'exec':
-----------------------------------------
let query_res conn s expect =
let msg label info =
if not (info="") then printf "%s: %s\n" label info;
flush stdout
in
printf "Query: %s\n" s;
let res = exec conn s in
msg "Error message" (resultErrorMessage res);
let status = resultStatus res in
if not (expect = status) then
begin
printf "Expecting [%s], getting [%s]\n"
(resStatus expect) (resStatus status);
finish conn;
exit 1;
end;
res
--------------------------------------
It was used only once in this program and I could find nothing in any
other ocaml examples or in the documentation explaining it.
The closest I got was
" Cannot exec camlrun (When launching a self-executable bytecode file.) The
ocamlrun could not be found in the executable path. Check that Objective
Caml has been properly installed on your system."
and some explainations about execv, execve and execvp in
The Objective Caml system
release 3.00
Documentation and user's manual
Xavier Leroy.
Can somebody explain this command to me please with some examples on
how to use it?
Regards.
Johann
--
J.H. Spies - Tel. 082 782 0336
"If we confess our sins, he is faithful and just to
forgive us our sins, and to cleanse us from all
unrighteousness." I John 1:9
next reply other threads:[~2001-01-14 20:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-14 13:26 Johann Spies [this message]
2001-01-16 14:53 ` exec? - solved Johann Spies
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=20010114152638.A2804@adept.co.za \
--to=jhspies@adept.co.za \
--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