vfork

vfork

Shachar Shemesh shachar at shemesh.biz
Sat Jun 20 23:31:32 IDT 2009


Is this in some reply to some unasked question? If so, I have to correct 
a few mistakes in your explanation. If not, do elaborate why you felt 
compelled to send this summary.

shlomo bauer wrote:
>
> Today, this is probably not the case for a variety of reasons --
>   
 From the vfork man page:
> BUGS
>        It  is  rather  unfortunate  that Linux revived this specter 
> from the past.  The BSD man page states: "This system call
>        will be eliminated when proper system sharing mechanisms are 
> implemented.  Users should not depend on the memory  shar-
>        ing semantics of vfork() as it will, in that case, be made 
> synonymous to fork(2)."

> notably copy on write semantics of memory; there is little reason to
> copy the uproc space (or whatever linux calls it now) since it can be
> copied on a write automatically.
Except on non-MMU machines, where "fork" is not implemented, and vfork 
is the only way to create new processes.

> vfork is called if exec is called shortly afterwards
No. vfork is called if you did not read the man page, or if you wish to 
run on non-MMU systems. Aside from "make", I don't know of another 
standard process that calls it.
>  -- vfork does no
> copying, instead the parent process "loans" its address space to the
> child and blocks until the child returns it.
Except most vfork implementations today do, in fact, copy the address space.

Shachar

-- 
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20090620/df85bf8f/attachment.html>


More information about the Linux-il mailing list