Message248805
| Author |
vstinner |
| Recipients |
Yi Ding, ned.deily, rbcollins, ronaldoussoren, vstinner |
| Date |
2015年08月18日.23:41:14 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1439941274.48.0.252719091799.issue24891@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I can reproduce the bug with gdb if the file descriptor 0 is closed before calling:
std = create_stdio(iomod, fd, 0, "<stdin>", encoding, errors);
and after the following lines were called:
fd = fileno(stdin);
if (!is_valid_fd(fd)) {
In initstdio () at Python/pylifecycle.c:1156.
create_stdio() fails in FileIO constructor, on the line:
if (_Py_fstat(self->fd, &fdfstat) < 0)
of _io_FileIO___init___impl() at Modules/_io/fileio.c:480
It's a corner case of the issue #7111, I would call it a race condition. |
|