Re:Fork() without exec() is dangerous in large programs (2016)
by int_19h on Tuesday June 14, 2022 @03:57PM
(#31745196)
An implementation of posix_spawn() is usually owned by the same people who implemented vfork(), so they know what is and isn't safe to call in that particular implementation. But we don't, and we shouldn't assume that the implementation will not change. That's exactly why public APIs and stability guarantees exist.
Re:Fork() without exec() is dangerous in large programs (2016)
by cryptonector on Tuesday June 14, 2022 @04:12PM
(#31745410)
Not on Linux!
Re:Fork() without exec() is dangerous in large programs (2016)
by tsimionescu on Wednesday June 15, 2022 @04:34PM
(#31759106)
Even if that's true, doing so after vfork() is still much harder than after fork(), not easier.
Moreover, most posix_spawn() implementations use vfork(), and they call more functions than _exit() and exec on the child side.
Let's be reasonable about these things.