Closed
Description
We're not opening anything with CLOEXEC
, so we're in theory leaking file descriptors across forks (they stay alive as long as the child stays alive).
We currently use getdtablesize
to close all these descriptors, but as #12103 (comment) says, this isn't enough if a thread manually lowers RLIMIT_NOFILE
.
We should consider opening file descriptors wherever possible with CLOEXEC
, but this also sounds like it's a tricky situation (not always supported to specify the flag at open-time).