mirror of
https://github.com/python/cpython.git
synced 2026-02-17 21:01:26 +00:00
gh-109981: Fix support.fd_count() on macOS 14 (GH-112797)
Use scanning "/dev/fd/" on macOS in support.fd_count(). That's both more efficient than scanning all possible file descriptors, and avoids crashing the interpreter when there are open "guarded" file descriptors.
"Guarded" file descriptors are a macOS feature where file descriptors used by system libraries are marked and cause hard crashes when used by "user" code.
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| bytecode_helper.py | ||
| hashlib_helper.py | ||
| import_helper.py | ||
| interpreters.py | ||
| logging_helper.py | ||
| os_helper.py | ||
| pty_helper.py | ||
| script_helper.py | ||
| socket_helper.py | ||
| threading_helper.py | ||
| warnings_helper.py | ||