mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-40280: Address more test failures on Emscripten (GH-31050)
Co-authored-by: Brett Cannon <brett@python.org>
This commit is contained in:
parent
9d4161a60c
commit
96b344c2f1
27 changed files with 227 additions and 49 deletions
|
@ -1278,6 +1278,8 @@ def reap_children():
|
|||
# Need os.waitpid(-1, os.WNOHANG): Windows is not supported
|
||||
if not (hasattr(os, 'waitpid') and hasattr(os, 'WNOHANG')):
|
||||
return
|
||||
elif not has_subprocess_support:
|
||||
return
|
||||
|
||||
# Reap all our dead child processes so we don't leave zombies around.
|
||||
# These hog resources and might be causing some of the buildbots to die.
|
||||
|
|
|
@ -502,7 +502,7 @@ class FakePath:
|
|||
def fd_count():
|
||||
"""Count the number of open file descriptors.
|
||||
"""
|
||||
if sys.platform.startswith(('linux', 'freebsd')):
|
||||
if sys.platform.startswith(('linux', 'freebsd', 'emscripten')):
|
||||
try:
|
||||
names = os.listdir("/proc/self/fd")
|
||||
# Subtract one because listdir() internally opens a file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue