Using vfork() -vs fork()

Guy Harris guy at auspex.auspex.com
Thu Jun 29 04:21:21 AEST 1989


>From what I can glean from the manual, the advantages of vfork() over
>fork() are (1) virtual memory efficiency and (2) shared access to parent
>memory, data structures, etc.  until an execv().

The Berkeley VFORK(2) manual page quite specifically states that 2) is
NOT to be depended on as a "feature" of "vfork()":

    BUGS
	This system call will be eliminated when proper system sharing
	mechanisms are implemented.  Users should not depend on the memory
	sharing semantics of "vfork" as it will, in that case, be made
	synonymous to "fork".



More information about the Comp.unix.questions mailing list