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 RAA27245; Thu, 8 Jul 2004 17:09:08 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 RAA27336 for ; Thu, 8 Jul 2004 17:09:07 +0200 (MET DST) Received: from yquem.inria.fr (yquem.inria.fr [128.93.8.37]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i68F92SH005647; Thu, 8 Jul 2004 17:09:02 +0200 Received: by yquem.inria.fr (Postfix, from userid 18180) id 7B943BBD8; Thu, 8 Jul 2004 17:09:02 +0200 (CEST) Date: Thu, 8 Jul 2004 17:09:02 +0200 From: Xavier Leroy To: Nathaniel Gray Cc: caml-list@inria.fr Subject: Re: [Caml-list] OS X: Trouble with threads + execv Message-ID: <20040708150902.GA4191@yquem.inria.fr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.28i X-Miltered: at concorde with ID 40ED638E.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 threads:01 execv:01 execv:01 otherlibs:01 systhreads:01 posix:01 execvp:01 execve:01 threads:01 posix:01 caml's:01 cmxa:01 supported:01 linking:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > 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. > > If I build the program without linking to threads.cmxa then it works as > expected. > Is this expected behavior? No. According to POSIX, exec* has no reason to fail if other threads are still running in the current process. These other threads are terminated. With system threads, Caml's Unix.exec* functions just call the corresponding system calls. If you want to make sure, you could try to reproduce this behavior with a small C program. - Xavier Leroy ------------------- 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