problems with mmap under windows nt
fishboy
fishboy at spamspamspam.com
Sat Jun 5 23:03:51 EDT 2004
On Tue, 01 Jun 2004 08:34:25 GMT, Manlio Perillo
<NOmanlio_perilloSPAM at libero.it> wrote:
>Hi.
>If I map a file (for WRITING) of 0 lenght, mmap raises an exception:
>
>WindowsError: [Errno 1006] The volume correspondent to the file has
>been altered from the extern. The opened file is no longer valid
>
>
>This is a problem only on windows?
>
>
>Thanks and regards Manlio Perillo
Some code would be nice, but I'm feeling psychic tonight.
Abracadabra! Two guesses
1. Windows mmap uses length 0 to mean the max size is the same as the
current size of the file. Now if the file doesnt already exist, you
could see how it might get confused.
2. The fileno needs to point at a file opened for *update*
The Great Fishmac has spoken!
><{{{*>
More information about the Python-list
mailing list