Mateusz Loskot added the comment:
Yes, it does. In file Modulfileio.c, in function fileio_init, there is this
code:
if (fd >= 0) {
if (check_fd(fd))
goto error;
self->fd = fd;
self->closefd = closefd;
}
The check_fd tests:
if (!_PyVerify_fd(fd) || (fstat(fd, &buf) < 0 && errno == EBADF)) {
The _PyVerify_fd(fd) == 1, but errno is "Bad file descriptor".
This eventually leads to Py_InitializeEx failure at:
if (initstdio() < 0)
Py_FatalError(
"Py_Initialize: can't initialize sys standard streams");
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue17797>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com