Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
b9a76e29
Commit
b9a76e29
authored
Jan 04, 2013
by
Charles-François Natali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #16860: In tempfile, use O_CLOEXEC when available to set the
close-on-exec flag atomically.
parent
4e02538b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
Lib/tempfile.py
Lib/tempfile.py
+2
-0
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/tempfile.py
View file @
b9a76e29
...
...
@@ -57,6 +57,8 @@ except ImportError:
_allocate_lock
=
_thread
.
allocate_lock
_text_openflags
=
_os
.
O_RDWR
|
_os
.
O_CREAT
|
_os
.
O_EXCL
if
hasattr
(
_os
,
'O_CLOEXEC'
):
_text_openflags
|=
_os
.
O_CLOEXEC
if
hasattr
(
_os
,
'O_NOINHERIT'
):
_text_openflags
|=
_os
.
O_NOINHERIT
if
hasattr
(
_os
,
'O_NOFOLLOW'
):
...
...
Misc/NEWS
View file @
b9a76e29
...
...
@@ -204,6 +204,9 @@ Core and Builtins
Library
-------
-
Issue
#
16860
:
In
tempfile
,
use
O_CLOEXEC
when
available
to
set
the
close
-
on
-
exec
flag
atomically
.
-
Issue
#
16674
:
random
.
getrandbits
()
is
now
20
-
40
%
faster
for
small
integers
.
-
Issue
#
16009
:
JSON
error
messages
now
provide
more
information
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment