caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Oliver Bandel <oliver@first.in-berlin.de>
To: caml-list@inria.fr
Subject: Re: [Caml-list] re: We should all be forking
Date: Wed, 6 Jun 2007 11:28:40 +0200	[thread overview]
Message-ID: <20070606092840.GH348@first.in-berlin.de> (raw)
In-Reply-To: <20070605223047.GB30586@yumegakanau.org>

On Tue, Jun 05, 2007 at 03:30:47PM -0700, Christopher Cramer wrote:
> Jon Harrop:
> > I believe the performance relies upon the Linux kernel lazily copying
> > the process. Does OSX also do that? 
> 
> It's called copy-on-write and I would be surprised if OSX didn't also
> do it.
> 
> The only way to start a new process is to fork, so even if you're just
> running another program you fork first, and then replace the process
> image with the new program with exec. If the fork had to copy the entire
> process image before just throwing it away upon exec, I think Unix,
> which is based around a philosophy of piping between multiple processes,
> would have abandoned fork a long time ago. Then again, there is vfork,
> so I guess they almost did abandon it at one point.
> 
[...]

vfork is only (!!!) for a fork-exec combination.

So, be aware: do not use vfork, if you don't exec right after it!


Ciao,
   Oliver


  parent reply	other threads:[~2007-06-06  9:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-05 22:30 Christopher Cramer
2007-06-05 22:53 ` [Caml-list] " Eric Cooper
2007-06-06  9:28 ` Oliver Bandel [this message]
2007-06-06 17:51   ` Shawn W.

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=20070606092840.GH348@first.in-berlin.de \
    --to=oliver@first.in-berlin.de \
    --cc=caml-list@inria.fr \
    /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).