3 ms·
> FDs really should have been opt-in for inheritability from the start, with the possible exception of stdio. Yes. > Inheritability being an fcntl is definite
by loeg 2y ago
> FDs really should have been opt-in for inheritability from the start, with the possible exception of stdio.
Yes.
> Inheritability being an fcntl is definitely one of the worst bits
Well, or you can use O_CLOEXEC in most APIs that create an fd.
- mmastrac 2y agoYep, totally, although there are still some holes in that. pipe2 being missing on Darwin is one example. You also need to hope that all the libraries you're integrating with are using O_CLOEXEC as well.