> You write "It's all the same "clone" code in the kernel."
> and that may be true, but I'm thinking about the glibc wrappers around them.
I only made that point in response to your contrasts between "a dedicated
vfork syscall number" and "a clone call passed CLONE_VFORK | CLONE_VM |
SIGCHLD", for
> But...posix_spawn doesn't give you any way to delete *all* file descriptors
> and if you try to collect them before spawning, there is a race in a
> multithreaded program.
This is something you should never want to do. There is notoriously no
good way to do it on some systems, where getdtablesi
I am a bit surprised that you see that failure mode, and it's possible it
indicates an actual bug in pthread_getattr_np that you could find some
other (kosher) way to provoke. But it is generally true that if you use
-lpthread then attempting using clone() with CLONE_VM on your own at all is
not a