Mercurial > cpython-lru_cache-weakref
diff Python/bltinmodule.c @ 39386:214e4a4384f1 2.4
Bug #1535165: fixed a segfault in input() and raw_input() when
sys.stdin is closed.
(backport from rev. 51129)
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Sun, 06 Aug 2006 08:23:59 +0000 |
| parents | 8bad1bfc3319 |
| children | c11cae2b9a75 |
line wrap: on
line diff
--- a/Python/bltinmodule.c Sun Aug 06 07:08:16 2006 +0000 +++ b/Python/bltinmodule.c Sun Aug 06 08:23:59 2006 +0000 @@ -1609,7 +1609,7 @@ if (PyFile_WriteString(" ", fout) != 0) return NULL; } - if (PyFile_Check(fin) && PyFile_Check(fout) + if (PyFile_AsFile(fin) && PyFile_AsFile(fout) && isatty(fileno(PyFile_AsFile(fin))) && isatty(fileno(PyFile_AsFile(fout)))) { PyObject *po;
