[issue10897] UNIX mmap unnecessarily dup() file descriptor

Charles-François Natali report at bugs.python.org
Sat Jun 11 18:40:14 CEST 2011


Charles-François Natali <neologix at free.fr> added the comment:

> Perhaps by adding some new argument to the mmap constructor? (dup_fd = True)

I don't really like the idea of exposing the FD duplication to the
user, because:
- it's an implementation detail
- it doesn't reflect any argument of the POSIX mmap version
- it should False by default

I really think that application code expecting to be able to resize
the mmap after closing the FD is broken, but I'm also a really strong
advocate of backward compatibility...
I don't see any satisfying solution.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10897>
_______________________________________


More information about the Python-bugs-list mailing list