mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Additional fix for issue #12268: The io module file object write methods no
longer abort early when a write system call is interrupted (EINTR).
This commit is contained in:
commit
84d0bf94b0
3 changed files with 15 additions and 3 deletions
|
|
@ -1247,8 +1247,11 @@ _textiowrapper_writeflush(textio *self)
|
|||
Py_DECREF(pending);
|
||||
if (b == NULL)
|
||||
return -1;
|
||||
ret = PyObject_CallMethodObjArgs(self->buffer,
|
||||
_PyIO_str_write, b, NULL);
|
||||
ret = NULL;
|
||||
do {
|
||||
ret = PyObject_CallMethodObjArgs(self->buffer,
|
||||
_PyIO_str_write, b, NULL);
|
||||
} while (ret == NULL && _PyIO_trap_eintr());
|
||||
Py_DECREF(b);
|
||||
if (ret == NULL)
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue