diff options
author | Gregory P. Smith <greg@krypto.org> | 2013-02-01 21:10:33 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@krypto.org> | 2013-02-01 21:10:33 (GMT) |
commit | 84d0bf94b036c5eb62b1fe31d33133a5ee05516d (patch) | |
tree | ee6c40925199eccfdb51040bc4c1c98002703010 /Modules/_io/textio.c | |
parent | ae42ec80046df47f0fee007b921acb86aff83a59 (diff) | |
parent | ee9b1722550a59dba3c36075e1d6d72f623e5cd7 (diff) | |
download | cpython-84d0bf94b036c5eb62b1fe31d33133a5ee05516d.zip cpython-84d0bf94b036c5eb62b1fe31d33133a5ee05516d.tar.gz cpython-84d0bf94b036c5eb62b1fe31d33133a5ee05516d.tar.bz2 |
Additional fix for issue #12268: The io module file object write methods no
longer abort early when a write system call is interrupted (EINTR).
Diffstat (limited to 'Modules/_io/textio.c')
-rw-r--r-- | Modules/_io/textio.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c index afd8d41..9da4cd2 100644 --- a/Modules/_io/textio.c +++ b/Modules/_io/textio.c @@ -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; |