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 eryksun
Recipients eryksun, izbyshev, paul.moore, steve.dower, tim.golden, vstinner, zach.ware
Date 2021-03-12.20:02:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1615579349.07.0.0711650342898.issue34780@roundup.psfhosted.org>
In-reply-to
Content
Console input handles pose the same risk of hanging indefinitely when io.FileIO is used in legacy standard I/O mode (i.e. PYTHONLEGACYWINDOWSSTDIO).

Seeking could simply be disallowed on all files that aren't FILE_TYPE_DISK. For example, change portable_lseek() in Modules/_io/fileio.c to check the file type:

    if (GetFileType((HANDLE)_get_osfhandle(fd)) != FILE_TYPE_DISK) {
        errno = ESPIPE;
        res = -1;
    } else {
        res = _lseeki64(fd, pos, whence);
    }
History
Date User Action Args
2021-03-12 20:02:29eryksunsetrecipients: + eryksun, paul.moore, vstinner, tim.golden, zach.ware, steve.dower, izbyshev
2021-03-12 20:02:29eryksunsetmessageid: <1615579349.07.0.0711650342898.issue34780@roundup.psfhosted.org>
2021-03-12 20:02:29eryksunlinkissue34780 messages
2021-03-12 20:02:28eryksuncreate