3 ms·
I think vfork is intended to avoid the CoW overhead? (at the cost of having really bizarre other semantics that make it tricky to use) Since it pauses the exec
by mark_undoio 4y ago
I think vfork is intended to avoid the CoW overhead? (at the cost of having really bizarre other semantics that make it tricky to use)
Since it pauses the execution of the parent process (or at least the parent thread?) it gives a window for the child to use the current stack frame to set up an exec() call.
When I first learned about vfork() (early 2000s) I had the impression it had become a bit pointless since CoW sharing had made fork() really fast. But with modern-sized address spaces it is (has become?) horribly slow again.