[issue23708] PEP 475: Add _Py_read() and _Py_write() functions

STINNER Victor report at bugs.python.org
Fri Mar 20 12:24:27 CET 2015


STINNER Victor added the comment:

> New changeset 07fd54208434 by Victor Stinner in branch 'default':
> Issue #23708: Save/restore errno in _Py_read() and _Py_write()

When I wrote _Py_read()/_Py_write(), I added assertions on errno to ensure that errno is not modified. I chose to use assertions instead of save/restore errno because on Linux errno is not modified. Since they *are* platforms where errno is modified, it's safer to always save/restore errno.

_Py_read()/_Py_write() *must* set set errno because some callers uses it. It's more convinient to use errno than having to get the errno attribute of the raised OSError exception.

test_signal pass again on "AMD64 Snow Leop 3.x" buildbot, I close the issue.

----------
resolution:  -> fixed
status: open -> closed

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


More information about the Python-bugs-list mailing list