lkml.org 
[lkml]   [2000]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Overcomittable memory
Date
From
"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/

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