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
71faefc3
Commit
71faefc3
authored
Mar 19, 2012
by
Ross Lagerwall
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #14359: Only use O_CLOEXEC in _posixmodule.c if it is defined.
Based on patch from Hervé Coatanhay.
parent
1623afff
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletion
+19
-1
Misc/ACKS
Misc/ACKS
+1
-0
Misc/NEWS
Misc/NEWS
+6
-0
Modules/_posixsubprocess.c
Modules/_posixsubprocess.c
+12
-1
No files found.
Misc/ACKS
View file @
71faefc3
...
...
@@ -173,6 +173,7 @@ Mike Clarkson
Andrew Clegg
Brad Clements
Steve Clift
Hervé Coatanhay
Nick Coghlan
Josh Cogliati
Dave Cole
...
...
Misc/NEWS
View file @
71faefc3
...
...
@@ -78,6 +78,12 @@ Extension Modules
- Issue #14212: The re module didn't retain a reference to buffers it was
scanning, resulting in segfaults.
Build
-----
- Issue #14359: Only use O_CLOEXEC in _posixmodule.c if it is defined.
Based on patch from Hervé Coatanhay.
What's New in Python 3.2.3 release candidate 2?
===============================================
...
...
Modules/_posixsubprocess.c
View file @
71faefc3
...
...
@@ -202,7 +202,18 @@ _close_open_fd_range_safe(int start_fd, int end_fd, PyObject* py_fds_to_keep)
int
fd_dir_fd
;
if
(
start_fd
>=
end_fd
)
return
;
fd_dir_fd
=
open
(
FD_DIR
,
O_RDONLY
|
O_CLOEXEC
,
0
);
#ifdef O_CLOEXEC
fd_dir_fd
=
open
(
FD_DIR
,
O_RDONLY
|
O_CLOEXEC
,
0
);
#else
fd_dir_fd
=
open
(
FD_DIR
,
O_RDONLY
,
0
);
#ifdef FD_CLOEXEC
{
int
old
=
fcntl
(
fd_dir_fd
,
F_GETFD
);
if
(
old
!=
-
1
)
fcntl
(
fd_dir_fd
,
F_SETFD
,
old
|
FD_CLOEXEC
);
}
#endif
#endif
if
(
fd_dir_fd
==
-
1
)
{
/* No way to get a list of open fds. */
_close_fds_by_brute_force
(
start_fd
,
end_fd
,
py_fds_to_keep
);
...
...
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