cpython: 30fc620e240e (original) (raw)
Mercurial > cpython
changeset 81879:30fc620e240e 3.3
Additional fix for issue #12268: The io module file object write methods no longer abort early when a write system call is interrupted (EINTR). [#12268]
Gregory P. Smith greg@krypto.org | |
---|---|
date | Fri, 01 Feb 2013 13:08:23 -0800 |
parents | 483488a1dec5(current diff)2fd669aa4abc(diff) |
children | 29e3aa7f2f4b |
files | Misc/NEWS Modules/_io/iobase.c Modules/_io/textio.c |
diffstat | 3 files changed, 15 insertions(+), 3 deletions(-)[+] [-] Misc/NEWS 6 Modules/_io/iobase.c 5 Modules/_io/textio.c 7 |
line wrap: on
line diff
--- a/Misc/NEWS +++ b/Misc/NEWS @@ -506,6 +506,12 @@ Library
- Issue #15906: Fix a regression in
argparse
caused by the preceding change, whenaction='append'
,type='str'
anddefault=[]
. +Extension Modules +----------------- + +- Issue #12268: The io module file object write methods no longer abort early
--- a/Modules/_io/iobase.c +++ b/Modules/_io/iobase.c @@ -669,7 +669,10 @@ iobase_writelines(PyObject self, PyObje break; / Stop Iteration */ }
res = PyObject_CallMethodObjArgs(self, _PyIO_str_write, line, NULL);[](#l2.7)
res = NULL;[](#l2.8)
do {[](#l2.9)
res = PyObject_CallMethodObjArgs(self, _PyIO_str_write, line, NULL);[](#l2.10)
} while (res == NULL && _PyIO_trap_eintr());[](#l2.11) Py_DECREF(line);[](#l2.12) if (res == NULL) {[](#l2.13) Py_DECREF(iter);[](#l2.14)
--- a/Modules/_io/textio.c +++ b/Modules/_io/textio.c @@ -1247,8 +1247,11 @@ static int Py_DECREF(pending); if (b == NULL) return -1;