Skip to content

Comment on Opening /proc/self/fd/1 is not the same as dup(1)parent

Comments

I would be happy if one day Linux gets rid of this insanity and adds a CreateProcess syscall that doesn't have to pretend to copy the entire address space of the current process.

fork() is going to exist forever, but posix_spawn() already exists:

https://linux.die.net/man/3/posix_spawn

I think clone(), or better yet clone3(), is closer to what I had in mind, as posix_spawn() is not a syscall, it's just a utility function calling fork()/vfork()/clone() and then exec().

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.