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

2016-05-07 Thread Martin Panter
Martin Panter added the comment: Closing because Victor has proposed a patch in Issue 26769. -- nosy: +martin.panter resolution: -> duplicate status: open -> closed superseder: -> Python 2.7: make private file descriptors non inheritable ___ Python

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

2016-04-15 Thread Berker Peksag
Changes by Berker Peksag : -- assignee: docs@python -> components: -Documentation versions: -Python 3.3 ___ Python tracker ___ ___

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

2013-10-31 Thread STINNER Victor
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

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

2013-10-30 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

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

2013-10-30 Thread Charles-François Natali
Charles-François Natali added the comment: I agree this should be fixed. Robert, want to submit a patch? -- ___ Python tracker ___ ___

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

2013-10-30 Thread Robert Merrill
Robert Merrill added the comment: Sorry, I correct my earlier statement: even if the fd you pass to mmap.mmap() is set to FD_CLOEXEC, the dup'd fd /will not be/ So this is a REALLY bad bug because users cannot workaround it except by just not using mmap -- ___

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

2013-10-30 Thread Robert Merrill
Robert Merrill added the comment: I'm adding Library again because I think the current behavior is a bug and should be fixed in the 2.7 tree. Perhaps the documentation in older versions should be updated mmap.mmap should always set the FD_CLOEXEC flag on the descriptor that it gets from dup(

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

2013-10-30 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +neologix ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

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

2013-10-30 Thread STINNER Victor
STINNER Victor added the comment: "the file descriptor that mmap.mmap() allocates is not set to close-on-exec" In Python 3.4, the file descriptor is now non-inheritable, as a side effect of the PEP 446. http://www.python.org/dev/peps/pep-0446/ -- versions: +Python 3.3, Python 3.4 -Pyth

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

2013-10-30 Thread Christian Heimes
Christian Heimes added the comment: Can you suggest a documentation update? -- assignee: -> docs@python components: +Documentation -Library (Lib) nosy: +christian.heimes, docs@python stage: -> needs patch versions: +Python 3.2 ___ Python tracker

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

2013-10-30 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

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

2013-10-29 Thread Robert Merrill
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 atten

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

2013-10-29 Thread Robert Merrill
New submission from Robert Merrill: Same code but different problem as this issue: http://bugs.python.org/issue10897 The above-linked issue was closed as WONTFIX, but there is a secondary problem: the file descriptor that mmap.mmap() allocates is not set to close-on-exec. This means that any p