On Tue, Dec 27, 2011 at 09:19:48AM +0000, YAMAMOTO Takashi wrote: > vfork based implementation has its advantages. eg. less kernel code > > i'm not sure what kind of "dirty libpthread changes". > can you explain?
We would need to guarantee thread safeness of posix_spawn() - but vfork itself is not. So either we would need to change the kernel vfork() to be thread safe (I guess I could do that, but it would be an intrusive mess), or deal with it inside libpthread somehow (I have no idea - enumerate all threads and stop them?). But worst: I don't see how we could possibly gain the main benefit of the interface (vfork like performance even for multithreaded apps) any way if we go this route. Martin
