Rendered at 17:43:24 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
nasretdinov 6 minutes ago [-]
I believe what's being described in the article is the same reason why some shells like fish also use posix_spawn() on macOS instead of fork/exec. Not only is it much faster, but it's also effectively problem-free for multi-threaded applications
dmitrygr 22 minutes ago [-]
fork() was always very restricted in when it could be used and really dangerous even then. It was made for a world where process == thread, and since that ceased to be true it's been a large footgun. Use spawn if you need to launch a process, reconsider your life if your immediate post-fork() syscall is not exec()