Message382753
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 |
|
Date |
User |
Action |
Args |
2020-12-08 17:47:01 | izbyshev | set | recipients:
+ izbyshev, paul.moore, vstinner, tim.golden, zach.ware, eryksun, steve.dower, nedsociety |
2020-12-08 17:47:01 | izbyshev | set | messageid: <1607449621.38.0.254633504211.issue42602@roundup.psfhosted.org> |
2020-12-08 17:47:01 | izbyshev | link | issue42602 messages |
2020-12-08 17:47:01 | izbyshev | create | |
|