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

Robert Merrill report at bugs.python.org
Wed Oct 30 06:25:24 CET 2013


Robert Merrill added the comment:

I should add a caveat: the fd that is created by mmap /will/ be set to close-on-exec if the fd you passed in was. But even if it's not, I see no reason why mmap should not be setting it anyway.

At the very least, the documentation should bring the user's attention to this potential stumbling block. Currently it makes no mention of the fact that mmap duplicates file descriptors at all, much less how the flags are set.

----------

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


More information about the Python-bugs-list mailing list