From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id VAA13880 for caml-red; Sun, 14 Jan 2001 21:53:00 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA03289 for ; Sun, 14 Jan 2001 15:39:06 +0100 (MET) Received: from ether.adept.co.za (ether.adept.co.za [196.25.67.7]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f0EEd3515709 for ; Sun, 14 Jan 2001 15:39:04 +0100 (MET) Received: from spyker (p198.pm-3.adept.co.za [64.245.8.198]) by ether.adept.co.za (Postfix) with ESMTP for id 6A9A7543; Sun, 14 Jan 2001 16:38:52 +0200 (SAST) Received: from js by spyker with local (Exim 3.12 #1 (Debian)) id 14HnB8-0000jU-00 for ; Sun, 14 Jan 2001 15:26:38 +0200 Date: Sun, 14 Jan 2001 15:26:38 +0200 From: Johann Spies To: caml-list@inria.fr Subject: exec? Message-ID: <20010114152638.A2804@adept.co.za> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: weis@pauillac.inria.fr 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