STINNER Victor added the comment: fstat_ebadf.patch: _Py_fstat() now also set errno on Windows.
It's a little bit different than your patch, because it still calls SetLastError(ERROR_INVALID_HANDLE) to explicitly set the Windows error on bad file descriptor. We must set errno et SetLastError(): some callers check for errno, some callers uses GetLastError() (ex: path_error()). I don't have access to Windows right now, I cannot test the patch. And it's maybe safer to wait after Python 3.5 alpha 2 release to apply it, if your latest change is enough to fix test_os on Windows. ---------- Added file: http://bugs.python.org/file38383/fstat_ebadf.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23524> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com