On Thu, Mar 16, 2000 at 10:34:28AM -0400, Horst von Brand wrote:
> vfork(2) has very weird semantics, if you follow the relevant standards by
> the letter you can't do anything at all except exec(2) immediately.
The documented vfork semantics are pretty much an artefact of the internals
of how C generated object code works; actually the semantics of vfork(2) are
fairly sane, basically like fork(2) + CLONE_VM + stopping the parent.
> Thus it is almost completely useless. vfork(2) was introduced to avoid
> copying a memory space just to discard it immediately on exec(2). With
> modern COW > fork(2)s, it isn't needed (and many Unices don't have a
> real vfork(2) anymore, it is just an alias for fork(2) so you don't have
> to redo all your legacy applications).
vfork(2) is just cloning the address space which is less expensive than
COW thing done by fork(2).
Ralf
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Fri Mar 31 2000 - 21:00:14 EST