gh-109981: Fix support.fd_count() on macOS 14 (#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. Co-authored-by: Victor Stinner <vstinner@python.org>
R
Ronald Oussoren committed
953ee622b3901d3467e65e3484dcfa75ba6fcddf
Parent: 16448ca
Committed by GitHub <noreply@github.com>
on 12/7/2023, 9:30:15 AM