[issue28864] Add devnull file-like object

Christian Heimes report at bugs.python.org
Mon Dec 5 10:35:37 EST 2016


Christian Heimes added the comment:

It can be done with some extra effort. We have to get the st_dev and st_inode from os.fstat(fd), cache them together with the fd, and verify them every time we create a new DevNull object. That way we catch both closed fd and modified fd. We might have to add a lock around the check, too.

----------
nosy: +christian.heimes

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


More information about the Python-bugs-list mailing list