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
45f31d14
Commit
45f31d14
authored
Jun 01, 2014
by
Gregory P. Smith
Browse files
Options
Browse Files
Download
Plain Diff
merge the end_fd comment fix and explicit wait() for the child.
parents
3fe9e8d5
ffd529cd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
Lib/test/test_subprocess.py
Lib/test/test_subprocess.py
+1
-1
Modules/_posixsubprocess.c
Modules/_posixsubprocess.c
+2
-2
No files found.
Lib/test/test_subprocess.py
View file @
45f31d14
...
...
@@ -1966,7 +1966,7 @@ class POSIXProcessTestCase(BaseTestCase):
import subprocess, sys
subprocess.Popen([sys.executable, {fd_status!r}] +
[str(x) for x in range({max_fd})],
close_fds=True)
close_fds=True)
.wait()
"""
.
format
(
fd_status
=
fd_status
,
max_fd
=
max_fd_open
+
1
))],
stdout
=
subprocess
.
PIPE
,
close_fds
=
False
)
finally
:
...
...
Modules/_posixsubprocess.c
View file @
45f31d14
...
...
@@ -234,8 +234,8 @@ struct linux_dirent64 {
char
d_name
[
256
];
/* Filename (null-terminated) */
};
/* Close all open file descriptors in the range
start_fd inclusive to end_fd
*
exclusive.
Do not close any in the sorted py_fds_to_keep list.
/* Close all open file descriptors in the range
from start_fd and higher
* Do not close any in the sorted py_fds_to_keep list.
*
* This version is async signal safe as it does not make any unsafe C library
* calls, malloc calls or handle any locks. It is _unfortunate_ to be forced
...
...
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