On 17/06/2016 21:45, Klemens Morgenstern wrote:
But on the other hand from a library design point of view, shouldn't the library have the best smart default in terms of performance and overhead on a given platform ? Instead of having a flag telling : please do it the same but efficiently ? Because on linux vfork is nothing but obsoleted and for a scenario of using execve looks better to me.
Again: obsolete and now removed in the posix-standard and that's what I ought to go with. Please note, that I'm trying to provide two platforms: Posix & Windows. Not Linux & Windows. Thereby I want to provide the most common way for both platforms; and though I really appreciate your scenario, I would not consider it the common way.
Possibly of interest is that according to the notes vfork+exec (and fork+exec, for that matter) was deprecated in favour of posix_spawn. Which appears to be less well documented, but does exist in some environments at least.