I recently happened upon an implementation of popen()
(different API, same idea) using clone(2)
, and so I opened an issue requesting use of vfork(2)
or posix_spawn()
for portability. It turns out that on Linux there's an important advantage to using clone(2)
. I think I should capture the things I wrote there in a better place. A gist, a blog, whatever.
So here goes.
Long ago, I, like many Unix fans, thought that fork(2)
and the fork-exec process spawning model were the greatest thing, and the Windows sucked for only having [exec*()
](http://pubs.opengroup.org/onlinepubs/9699919