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
ea35d39a
Commit
ea35d39a
authored
Aug 18, 2011
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Plain Diff
merge heads
parents
c07f3be4
558639f0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
Lib/subprocess.py
Lib/subprocess.py
+6
-1
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/subprocess.py
View file @
ea35d39a
...
...
@@ -424,12 +424,16 @@ try:
except
:
MAXFD
=
256
# This lists holds Popen instances for which the underlying process had not
# exited at the time its __del__ method got called: those processes are wait()ed
# for synchronously from _cleanup() when a new Popen object is created, to avoid
# zombie processes.
_active
=
[]
def
_cleanup
():
for
inst
in
_active
[:]:
res
=
inst
.
_internal_poll
(
_deadstate
=
sys
.
maxsize
)
if
res
is
not
None
and
res
>=
0
:
if
res
is
not
None
:
try
:
_active
.
remove
(
inst
)
except
ValueError
:
...
...
@@ -1272,6 +1276,7 @@ class Popen(object):
errread
,
errwrite
,
errpipe_read
,
errpipe_write
,
restore_signals
,
start_new_session
,
preexec_fn
)
self
.
_child_created
=
True
finally
:
# be sure the FD is closed no matter what
os
.
close
(
errpipe_write
)
...
...
Misc/NEWS
View file @
ea35d39a
...
...
@@ -262,6 +262,9 @@ Core and Builtins
Library
-------
- Issue #12650: Fix a race condition where a subprocess.Popen could leak
resources (FD/zombie) when killed at the wrong time.
- Issue #12744: Fix inefficient representation of integers between 2**31 and
2**63 on systems with a 64-bit C "long".
...
...
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