This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author neologix
Recipients neologix, rosslagerwall, superbobry
Date 2011-07-15.17:34:13
SpamBayes Score 8.0837447e-07
Marked as misclassified No
Message-id <1310751253.93.0.505948371246.issue12556@psf.upfronthosting.co.za>
In-reply-to
Content
A couple remarks:
- if st_size == 0, then you have to specify an explicit length (your example passes 0, which would fail with EINVAL without the check)
- most enties in /proc don't support mmap file operation, so it's likely to fail anyway (with ENODEV, EACCESS...). Do you have an example of a /proc entry with st_size == 0 that can be mmapped (mapping /proc/sys/debug/exception-trace fails with EACCESS)?

> How about adding a keyword argument to `mmap.mmap()`, which disables
> fstat-based size checks?

I don't like the idea of adding an argument which doesn't have a counterpart in the POSIX version (especially to address such corner cases).
History
Date User Action Args
2011-07-15 17:34:14neologixsetrecipients: + neologix, rosslagerwall, superbobry
2011-07-15 17:34:13neologixsetmessageid: <1310751253.93.0.505948371246.issue12556@psf.upfronthosting.co.za>
2011-07-15 17:34:13neologixlinkissue12556 messages
2011-07-15 17:34:13neologixcreate