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 vstinner
Recipients neologix, vstinner
Date 2013-01-12.14:54:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The following extract of _close_open_fd_range_safe() is not correct:

#ifdef O_CLOEXEC
    fd_dir_fd = open(FD_DIR, O_RDONLY | O_CLOEXEC, 0);
    fd_dir_fd = open(FD_DIR, O_RDONLY, 0);
        int old = fcntl(fd_dir_fd, F_GETFD);
        if (old != -1)
            fcntl(fd_dir_fd, F_SETFD, old | FD_CLOEXEC);

On Linux older than 2.6.23, O_CLOEXEC may be defined by the glibc whereas the kernel does not support it. In this case, the flag is simply ignored and close-on-exec flag is not set on the file descriptor.
Date User Action Args
2013-01-12 14:54:13vstinnersetrecipients: + vstinner, neologix
2013-01-12 14:54:13vstinnersetmessageid: <>
2013-01-12 14:54:13vstinnerlinkissue16946 messages
2013-01-12 14:54:12vstinnercreate