bug? mmap doesn't like 0-length files

N

Neal Becker

mmap.mmap (f.fileno(), 0, prot=mmap.PROT_READ)
error: [Errno 22] Invalid argument

According to http://docs.python.org/library/mmap.html, mmap on _windows_
doesn't accept 0-length file. But this was tested on linux. Is this a bug?

I don't see anything in linux man-page about the underlying C mmap function
not accepting 0-length files.
 
N

Nobody

I don't see anything in linux man-page about the underlying C mmap function
not accepting 0-length files.

My mmap(2) manpage says:

ERRORS
...
EINVAL (since Linux 2.6.12) length was 0.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,697
Latest member
AugustNabo

Latest Threads

Top