Re: Overcomittable memory

From: Horst von Brand (vonbrand@pincoya.inf.utfsm.cl)
Date: Thu Mar 16 2000 - 09:34:28 EST


"Rask Ingemann Lambertsen" <rask-linux@kampsax.k-net.dk> said:

[...]

> Much of this whole thread demonstrates why fork()/exec() is not great
> for launching programs, the example above is just one of them. As someone
> else pointed out (correctly, AFAIK), using vfork()/exec() instead is the
> solution.

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. 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).

-- 
Dr. Horst H. von Brand                       mailto:vonbrand@inf.utfsm.cl
Departamento de Informatica                     Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria              +56 32 654239
Casilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513

- 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 : Thu Mar 23 2000 - 21:00:20 EST