This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mloskot
Recipients amaury.forgeotdarc, mloskot
Date 2013-04-19.12:32:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1366374765.56.0.979848994033.issue17797@psf.upfronthosting.co.za>
In-reply-to
Content
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");
History
Date User Action Args
2013-04-19 12:32:45mloskotsetrecipients: + mloskot, amaury.forgeotdarc
2013-04-19 12:32:45mloskotsetmessageid: <1366374765.56.0.979848994033.issue17797@psf.upfronthosting.co.za>
2013-04-19 12:32:45mloskotlinkissue17797 messages
2013-04-19 12:32:45mloskotcreate