[issue23524] Use _set_thread_local_invalid_parameter_handler in posixmodule

STINNER Victor report at bugs.python.org
Sun Mar 8 03:29:24 CET 2015


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/file38384/fstat_ebadf.patch

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


More information about the Python-bugs-list mailing list