Re: Porting vfork()

Horst von Brand (vonbrand@sleipnir.valparaiso.cl)
Sun, 10 Jan 1999 18:56:51 -0400


Chris Wedgwood <chris@cybernet.co.nz> said:
> On Fri, Jan 08, 1999 at 12:59:26AM -0500, Anthony Barbachan wrote:
> > I'm not sure either, but perl seams to think so. Its configure
> > script defaults to a broken vfork() on Linux.

> But perl works under linux -- almost perfectly (no worse that
> anyowhere else), so it can't be a big deal there...

A cursory check shows that Perl uses vfork(2) whenever it knows an exec(2)
will follow. And where it is deemed broken it just #defines it as fork(),
so the "special semantics" that is so much discussed here is not at play.
Nobody in sane mind will use vfork(2)'s semantics anyway, it is just an
accident of the implementation of a unsafe, fast version of fork(2) for
machines/systems that couldn't manage a correct fork(2) efficiently.

Everybody who cited manpages here showed that it might just be an alias for
fork(2), go away without warning, and in general does _not_ work the same
way across systems. If a part of vfork(2)s screwy semantics is needed,
better design a system call that does the Needed Stuff(tm), and add it to
Linux' extensions. Don't redo past mistakes. Pretty please.

-- 
Horst von Brand                             vonbrand@sleipnir.valparaiso.cl
Casilla 9G, Viņa del Mar, Chile                               +56 32 672616

- 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/