[lkml]   [1999]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Porting vfork()
On Tue, Jan 05, 1999 at 03:46:11PM -0600, wrote:
> So, the question: is linux vfork() behavior annoying anyone else and is it
> worth fixing? (other than to eliminate its appearance in the BUG area of the
> Linux fork() man page ;)

What are you doing with vfork? The reason vfork exists is in the special
case where fork() is followed by exec*(), and the memory copy (used to be?)
prohibitively expensive. [I am missing a reference to this effect, so I
can't be 100% authoritative. Reportedly, _The Magic Garden Explained_
talks about this, but I am passing this along secondhand]

Is it possible that you're taking advantage of the shared memory as
mentioned in SunOS 5.6's manpage for vfork, or the Stevens book mentioned
in the vfork-related message at [1] (be sure you read the reply at [2]?
In this case, you may be able to use clone(0, SIGCHLD) instead of vfork().
Maybe something like
#ifdef LINUX
#define vfork() clone(0, SIGCHLD)
but until you make clear what abuse of vfork() you're relying on, who knows
whether this does what you want.

\/ Jeff Epler
Term, holidays, term, holidays, till we leave school, and then work, work,
work till we die.
-- C.S. Lewis

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:49    [W:0.099 / U:0.256 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site