Subject: Re: popen reentrant (was Re: SA/pthread and vfork)
To: Matthias Buelow <mkb@mukappabeta.de>
From: Todd Vierling <tv@duh.org>
List: tech-kern
Date: 09/14/2003 15:02:36
On Sun, 14 Sep 2003, Matthias Buelow wrote:

: >Uh, it's a significant performance boost even on modern hardware for
: >the types of applications where it is intended to be used.
:
: What are these applications?

cd /usr/src
./build.sh

This was in fact benchmarked and posted to tech-kern and/or current-users at
one point.  Search the archives if you're curious; the resultant speedup on
make(1) was nontrivial.

: At the very least it should be marked as deprecated, and it certainly
: should not be used for new applications (it's unportable anyways).

Actually, vfork(2) tends to be more portable than fork(2) to embedded
systems, where a paged memory management unit may not even exist.  In such
environments -- and the number is growing -- fork(2) is either a gross hack,
or nonworking at all.  Not that this is relevant to NetBSD, though there are
other OS's where it is very relevant.

However, it's not like vfork(2) has caused us any trouble outside of
threads, so "what's the problem?"

-- 
-- Todd Vierling <tv@duh.org> <tv@pobox.com>