summaryrefslogtreecommitdiffstats
path: root/Modules/_io/_iomodule.h
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2012-06-24 07:23:47 (GMT)
committerGregory P. Smith <greg@krypto.org>2012-06-24 07:23:47 (GMT)
commit990a5feba77de7fc5fd5ad5a16f61dc93667f63e (patch)
treeb0fdb65c20e4a233f59a60c4aa2081949a9cf441 /Modules/_io/_iomodule.h
parent80d440aee198abc4077f7c30ecbf0a14e42c6eea (diff)
parent5135992164f4c0df8d18d3b486431b28214db16b (diff)
downloadcpython-990a5feba77de7fc5fd5ad5a16f61dc93667f63e.zip
cpython-990a5feba77de7fc5fd5ad5a16f61dc93667f63e.tar.gz
cpython-990a5feba77de7fc5fd5ad5a16f61dc93667f63e.tar.bz2
Fixes issue #12268: File readline, readlines and read() or readall() methods
no longer lose data when an underlying read system call is interrupted. IOError is no longer raised due to a read system call returning EINTR from within these methods.
Diffstat (limited to 'Modules/_io/_iomodule.h')
-rw-r--r--Modules/_io/_iomodule.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/_io/_iomodule.h b/Modules/_io/_iomodule.h
index 987aac8..0fe90a3 100644
--- a/Modules/_io/_iomodule.h
+++ b/Modules/_io/_iomodule.h
@@ -57,6 +57,11 @@ extern Py_ssize_t _PyIO_find_line_ending(
int translated, int universal, PyObject *readnl,
int kind, char *start, char *end, Py_ssize_t *consumed);
+/* Return 1 if an EnvironmentError with errno == EINTR is set (and then
+ clears the error indicator), 0 otherwise.
+ Should only be called when PyErr_Occurred() is true.
+*/
+extern int _PyIO_trap_eintr(void);
#define DEFAULT_BUFFER_SIZE (8 * 1024) /* bytes */