On 01/24/2011 04:08 PM, Eric Blake wrote:
> It
> is only on platforms like Linux where a clone()-style syscall exists
> where vfork() can be faster than a full fork().

No, vfork has been much faster than fork for ages, on many platforms.
For example, it was faster on 4.2BSD Unix, circa 1983, and
it remains faster on many other platforms that do not have clone()
or anything like clone().

It is true that vfork is not always a win.  But
it is often a significant win, and it is never slower
than fork.

Perhaps you're right that posix_spawn is an acceptable
substitute, performance-wise, for vfork nowadays.
But I'd feel more comfortable if we had performance figures
to verify this.  (And I'd also feel more comfortable if
posix_spawn were not so aggravatingly complicated; I will
not at all be surprised if posix_spawn is in practice
even more bug-prone than vfork.)

Reply via email to