bug? mmap doesn't like 0-length files

Cameron Simpson cs at zip.com.au
Tue Nov 23 04:00:59 CET 2010

On 23Nov2010 13:59, I wrote:
| On 22Nov2010 20:33, Neal Becker <ndbecker2 at gmail.com> wrote:
| |  mmap.mmap (f.fileno(), 0, prot=mmap.PROT_READ)
| | error: [Errno 22] Invalid argument
| | I don't see anything in linux man-page about the underlying C mmap function 
| | not accepting 0-length files.

It's worth noting that any time you get an errno error/exception then it
is almost certainly the underlying OS interface that has rejected your
request, not the python library.

Cameron Simpson <cs at zip.com.au> DoD#743

Don't have awk? Use this simple sh emulation:
    echo 'Awk bailing out!' >&2
    exit 2
- Tom Horsley <tahorsley at csd.harris.com>

More information about the Python-list mailing list