caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: Nathaniel Gray <n8gray@caltech.edu>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] OS X: Trouble with threads + execv
Date: Thu, 8 Jul 2004 17:09:02 +0200	[thread overview]
Message-ID: <20040708150902.GA4191@yquem.inria.fr> (raw)
In-Reply-To: <EF5A1012-D066-11D8-9D7A-000A95984F4E@caltech.edu>

> 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


  reply	other threads:[~2004-07-08 15:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-07 22:42 Nathaniel Gray
2004-07-08 15:09 ` Xavier Leroy [this message]
2004-07-08 17:52   ` Nathaniel Gray

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=20040708150902.GA4191@yquem.inria.fr \
    --to=xavier.leroy@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=n8gray@caltech.edu \
    /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;
as well as URLs for NNTP newsgroup(s).