caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* exec?
@ 2001-01-14 13:26 Johann Spies
  2001-01-16 14:53 ` exec? - solved Johann Spies
  0 siblings, 1 reply; 2+ messages in thread
From: Johann Spies @ 2001-01-14 13:26 UTC (permalink / raw)
  To: caml-list

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 



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: exec? - solved
  2001-01-14 13:26 exec? Johann Spies
@ 2001-01-16 14:53 ` Johann Spies
  0 siblings, 0 replies; 2+ messages in thread
From: Johann Spies @ 2001-01-16 14:53 UTC (permalink / raw)
  To: caml-list

On Sun, Jan 14, 2001 at 03:26:38PM +0200, Johann Spies wrote:
> I am a newbie learning ocaml.  In a demo using 
> libpq_ocaml I found a command 'exec':
...
> --------------------------------------
> 
> It was used only once in this program and I could find nothing in any
> other ocaml examples or in the documentation explaining it.

Sorry for the waste of bandwidth, but I found the function: an
external function in libpq.ml.

Johann.

-- 
J.H. Spies - Tel. 082 782 0336 
     "Jesus said unto her, I am the resurrection, and the 
      life; he that believeth in me, though he were dead, 
      yet shall he live"                John 11:25 



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-01-20 15:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-14 13:26 exec? Johann Spies
2001-01-16 14:53 ` exec? - solved Johann Spies

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).