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 <rep...@bugs.python.org> <http://bugs.python.org/issue28864> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com