From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id AAA27278; Thu, 8 Jul 2004 00:42:28 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id AAA27923 for ; Thu, 8 Jul 2004 00:42:27 +0200 (MET DST) Received: from swordfish.cs.caltech.edu (swordfish.cs.caltech.edu [131.215.44.124]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i67MgPEV026072 for ; Thu, 8 Jul 2004 00:42:26 +0200 Received: from [131.215.44.202] (DHCP-44-202.cs.caltech.edu [131.215.44.202]) by swordfish.cs.caltech.edu (Postfix) with ESMTP id DB531DF2B6 for ; Wed, 7 Jul 2004 15:42:24 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v618) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; format=flowed To: caml-list@inria.fr From: Nathaniel Gray Subject: [Caml-list] OS X: Trouble with threads + execv Date: Wed, 7 Jul 2004 15:42:32 -0700 X-Mailer: Apple Mail (2.618) X-Miltered: at nez-perce with ID 40EC7C51.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; threads:01 execv:01 execv:01 otherlibs:01 systhreads:01 posix:01 execvp:01 execve:01 ocamlc:01 usr:01 ocamlc:01 ocamlopt:01 -thread:01 threads:01 -linkall:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello, I'm seeing some confusing behavior on OS X (10.3.4) relating to pthreads and the execv family of calls. It appears that when the scheduler thread (from otherlibs/systhreads/thread_posix.ml) is running, any call to execv will fail with "Operation not supported." The same applies to execvp, execve, and execvpe. Here's a small test program: --- begin testing.ml --- open Unix let args = [| "ocamlc.opt"; "-v" |];; handle_unix_error (execv "/usr/local/bin/ocamlc.opt") args;; --- End testing.ml --- I build with: ocamlopt -thread unix.cmxa threads.cmxa testing.ml -linkall The result: [n8gray@golux tmp]$ a.out a.out: "execv" failed on "/usr/local/bin/ocamlc.opt": Operation not supported If I build the program without linking to threads.cmxa then it works as expected. Is this expected behavior? Thanks, -n8 -- >>>-- Nathaniel Gray -- Caltech Computer Science ------> >>>-- Mojave Project -- http://mojave.cs.caltech.edu --> ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners