[issue21627] Concurrently closing files and iterating over the open files directory is not well specified

Steven Stewart-Gallus report at bugs.python.org
Mon Jun 2 02:56:58 CEST 2014


Steven Stewart-Gallus added the comment:

Gah, I had trouble figuring out mecurial.

Close files after reading open files and not concurrently

This commit removes the old behaviour of closing files concurrently
with reading the system's list of open files and instead closes the
files after the list has been read.

Because no memory can be allocated in that specific context the
approach of setting the CLOEXEC flag and letting the following exec
close the files has been used.

For consistency, the brute force approach to closing the files has
also been modified to set the CLOEXEC flag.

----------
keywords: +patch
Added file: http://bugs.python.org/file35441/cloexec.patch

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


More information about the Python-bugs-list mailing list