[docs] [issue19444] mmap.mmap() allocates a file descriptor that isn't CLOEXEC

STINNER Victor report at bugs.python.org
Thu Oct 31 23:24:11 CET 2013


STINNER Victor added the comment:

> Robert, want to submit a patch?

If someone wants to work on a patch, here is the code of Python 3.4 to duplicate a file descriptor and make it non-inheritable.
  http://hg.python.org/cpython/file/e97d9926da83/Python/fileutils.c#l978
and
  http://hg.python.org/cpython/file/e97d9926da83/Python/fileutils.c#l618

The code is complex because it has optimized versions for each operating system. Only supporting Windows and fcntl() is enough for Python 2.

----------

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


More information about the docs mailing list