]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-92301: subprocess: Prefer close_range() to procfs-based fd closing (#92303)
authorAlexey Izbyshev <izbyshev@ispras.ru>
Thu, 5 May 2022 16:46:19 +0000 (19:46 +0300)
committerGitHub <noreply@github.com>
Thu, 5 May 2022 16:46:19 +0000 (09:46 -0700)
commit58573ffba0e4d3c7d6e6712169578e45d2926dbd
tree7f695ae7bd7560b989c62f88425579893c089b61
parente65e587f9320947d73817fbe62c11d2a0fd50dfb
gh-92301: subprocess: Prefer close_range() to procfs-based fd closing (#92303)

#92301: subprocess: Prefer `close_range()` to procfs-based fd closing.

`close_range()` is much faster for large number of file descriptors, e.g.
4 times faster for 1000 descriptors in a Linux 5.16-based environment.

We prefer close_range() only if it's known to be async-signal-safe.
Misc/NEWS.d/next/Library/2022-05-04-11-54-37.gh-issue-92301.eqjoYX.rst [new file with mode: 0644]
Modules/_posixsubprocess.c