[issue16850] Atomic open + close-and-exec

STINNER Victor report at bugs.python.org
Thu Jan 3 16:30:04 CET 2013


STINNER Victor added the comment:

> The problem is the find a portable and safe way to expose the feature

A solution is to add a "e" mode to open() which would raise a NotImplementedError if the platform is not known to support this feature. For example, if the OS is linux, we would check if the kernel version is at least 2.6.23, otherwise an exception would be raised.

The check (on the OS/version) would be done at the first call the function (if the "e" mode if used).

We already have such behaviour on other functions.

----------

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


More information about the Python-bugs-list mailing list