[issue47260] os.closerange() can be no-op in a seccomp sandbox

Kyle Evans report at bugs.python.org
Fri Apr 8 10:49:16 EDT 2022


Kyle Evans <kevans at FreeBSD.org> added the comment:

Sure, sounds good to me. The original theory (IIRC, I've slept many times since then :-)) was that we already know first/last are valid and there are no other defined errors, so 'other errors' must be because close_range has started percolating up something from closing individual files.

It's been years now and that hasn't happened, even with more recent flag additions. I think it's safe to say it won't, and such a fallback upon error won't put us back into a bogus pre-close_range situation where we're needlessly close()ing a bunch of closed fds.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue47260>
_______________________________________


More information about the Python-bugs-list mailing list