Message414039
On Windows, `mmap.mmap(f.fileno(), ...)` has the undocumented side effect of setting f's file pointer to 0.
The responsible code in mmapmodule is this:
/* Win9x appears to need us seeked to zero */
lseek(fileno, 0, SEEK_SET);
Win9x is no longer supported, and I'm quite sure that NT doesn't have whatever problem they were trying to fix. I think this code should be deleted, and a regression test added to verify that mmap leaves the file pointer alone on all platforms.
(mmap also maintains its own file pointer, the `pos` field of `mmap_object`, which is initially set to zero. This issue is about the kernel file pointer, not mmap's pointer.) |
|
Date |
User |
Action |
Args |
2022-02-25 20:47:49 | benrg | set | recipients:
+ benrg, paul.moore, tim.golden, zach.ware, steve.dower |
2022-02-25 20:47:49 | benrg | set | messageid: <1645822069.83.0.570318294839.issue46858@roundup.psfhosted.org> |
2022-02-25 20:47:49 | benrg | link | issue46858 messages |
2022-02-25 20:47:49 | benrg | create | |
|