summaryrefslogtreecommitdiffstats
path: root/Modules/_io/textio.c
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2013-02-01 21:08:23 (GMT)
committerGregory P. Smith <greg@krypto.org>2013-02-01 21:08:23 (GMT)
commit99ec7f6f3ec2bad516faa34afb18e01637011127 (patch)
treeefe0ab76e7390da0ff78c696ea40da22e6782f06 /Modules/_io/textio.c
parent193e1be72d2f9bb45e054b38dd9ed1090c45f3bf (diff)
parentb9817b01edfe6fa369c4c291a5de00732b8abc7c (diff)
downloadcpython-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/textio.c')
-rw-r--r--Modules/_io/textio.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c
index a93049f..ffaa945 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;