Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Lib/test/support/os_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ def fd_count():
"""
if sys.platform.startswith(('linux', 'android', 'freebsd', 'emscripten')):
fd_path = "/proc/self/fd"
elif sys.platform == "darwin":
elif support.is_apple:
fd_path = "/dev/fd"
else:
fd_path = None
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Use ``/dev/fd`` on other Apple platforms, in addition to macOS, to determine
the number of open files in ``test.support.os_helper.fd_count`` to avoid a crash
with "guarded" file descriptors when probing for open files.

The text for this entry is adapted from the previous one fixing the issue for macOS.
Comment thread
freakboy3742 marked this conversation as resolved.
Outdated
Loading