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 izbyshev
Recipients eryksun, izbyshev, nedsociety, paul.moore, steve.dower, tim.golden, vstinner, zach.ware
Date 2020-12-08.17:47:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1607449621.38.0.254633504211.issue42602@roundup.psfhosted.org>
In-reply-to
Content
Yes, despite that MSVCRT knows the type of the file descriptor because it calls GetFileType() on its creation, it doesn't check it in lseek() implementation and simply calls SetFilePointer(), which spuriously succeeds for pipes. MSDN says the following[1]:

Calling the SetFilePointer function with a handle to a non-seeking device such as a pipe or a communications device is not supported, even though the SetFilePointer function may not return an error. The behavior of the SetFilePointer function in this case is undefined.

[1] https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-setfilepointer
History
Date User Action Args
2020-12-08 17:47:01izbyshevsetrecipients: + izbyshev, paul.moore, vstinner, tim.golden, zach.ware, eryksun, steve.dower, nedsociety
2020-12-08 17:47:01izbyshevsetmessageid: <1607449621.38.0.254633504211.issue42602@roundup.psfhosted.org>
2020-12-08 17:47:01izbyshevlinkissue42602 messages
2020-12-08 17:47:01izbyshevcreate