[issue21207] urandom persistent fd - not re-openned after fd close

Antoine Pitrou report at bugs.python.org
Wed Apr 23 00:57:40 CEST 2014


Antoine Pitrou added the comment:

> maybe you've thought and dismissed this already but os.close could
> call dev_urandom_close for the urandom_fd. Then there's no fstat calls
> in every random access.

That's fine if os.close() is indeed used to close fd, but not if some
third-party library uses the C close() function directly. I don't know
how likely that is, but I think it's better to squash the bug
completely, rather than 80% of it :-)

(also some other stdlib code might (?) also call C close()...)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21207>
_______________________________________


More information about the Python-bugs-list mailing list