diff options
author | Gregory P. Smith <greg@krypto.org> | 2013-02-01 21:08:23 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@krypto.org> | 2013-02-01 21:08:23 (GMT) |
commit | 99ec7f6f3ec2bad516faa34afb18e01637011127 (patch) | |
tree | efe0ab76e7390da0ff78c696ea40da22e6782f06 /Modules/_io/iobase.c | |
parent | 193e1be72d2f9bb45e054b38dd9ed1090c45f3bf (diff) | |
parent | b9817b01edfe6fa369c4c291a5de00732b8abc7c (diff) | |
download | cpython-99ec7f6f3ec2bad516faa34afb18e01637011127.zip cpython-99ec7f6f3ec2bad516faa34afb18e01637011127.tar.gz cpython-99ec7f6f3ec2bad516faa34afb18e01637011127.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/iobase.c')
-rw-r--r-- | Modules/_io/iobase.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/_io/iobase.c b/Modules/_io/iobase.c index babb019..2039147 100644 --- a/Modules/_io/iobase.c +++ b/Modules/_io/iobase.c @@ -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); |