[issue33021] Some fstat() calls do not release the GIL, possibly hanging all threads

Josh Rosenberg report at bugs.python.org
Wed Mar 7 21:24:30 EST 2018


Josh Rosenberg <shadowranger+python at gmail.com> added the comment:

fstat is async signal safe, and I suspect it's thread safe in general, though usage does rely on the file descriptor remaining valid. If the fd in question is closed in another thread after the GIL is released, fstat would fail; if a new file is opened and assigned the same fd, it would give erroneous results. But I don't think any of that would lead to fundamentally incorrect behavior (after all, you could do the same thing manually by caching an fd then closing the file).

----------
nosy: +josh.r

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


More information about the Python-bugs-list mailing list