mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +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
99ec7f6f3e
3 changed files with 15 additions and 3 deletions
|
@ -669,7 +669,10 @@ iobase_writelines(PyObject *self, PyObject *args)
|
|||
break; /* Stop Iteration */
|
||||
}
|
||||
|
||||
res = PyObject_CallMethodObjArgs(self, _PyIO_str_write, line, NULL);
|
||||
res = NULL;
|
||||
do {
|
||||
res = PyObject_CallMethodObjArgs(self, _PyIO_str_write, line, NULL);
|
||||
} while (res == NULL && _PyIO_trap_eintr());
|
||||
Py_DECREF(line);
|
||||
if (res == NULL) {
|
||||
Py_DECREF(iter);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue