Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4e02538 commit b9a76e2Copy full SHA for b9a76e2
2 files changed
Lib/tempfile.py
@@ -57,6 +57,8 @@ def _set_cloexec(fd):
57
_allocate_lock = _thread.allocate_lock
58
59
_text_openflags = _os.O_RDWR | _os.O_CREAT | _os.O_EXCL
60
+if hasattr(_os, 'O_CLOEXEC'):
61
+ _text_openflags |= _os.O_CLOEXEC
62
if hasattr(_os, 'O_NOINHERIT'):
63
_text_openflags |= _os.O_NOINHERIT
64
if hasattr(_os, 'O_NOFOLLOW'):
Misc/NEWS
@@ -204,6 +204,9 @@ Core and Builtins
204
Library
205
-------
206
207
+- Issue #16860: In tempfile, use O_CLOEXEC when available to set the
208
+ close-on-exec flag atomically.
209
+
210
- Issue #16674: random.getrandbits() is now 20-40% faster for small integers.
211
212
- Issue #16009: JSON error messages now provide more information.
0 commit comments