vfork has real performance advantages in many applications,
and we shouldn't reject it merely because it's not specified
by POSIX (we use a lot of things that aren't in POSIX :-).

See, for example,
<http://blog.famzah.net/tag/fork-vfork-performance/>
which gives an example where vfork+exec is more than
ten times faster than fork+exec on a Linux kernel.
And I've seen examples where the disparity is much greater
than that.

In this particular case, it'd be trivial to fix the code
so that it would be safe to use for vfork.

That being said, it's not clear that diff3 and sdiff are
good examples where vfork is worth the hassle.  To show that,
I'd have to do some performance analysis, which right now I
don't have time to do.

Reply via email to