]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-40423: Optimization: use close_range(2) if available (GH-22651)
authorKyle Evans <kevans91@users.noreply.github.com>
Sun, 11 Oct 2020 20:18:53 +0000 (15:18 -0500)
committerGitHub <noreply@github.com>
Sun, 11 Oct 2020 20:18:53 +0000 (13:18 -0700)
commit1800c600801709958af66bebfa683a4e7570810f
tree6ac63c960220b9e666db1e8d2f36dd3f39068c92
parentc230fde8475e4e5581e74a4235654d17ccf4cff8
bpo-40423: Optimization: use close_range(2) if available (GH-22651)

close_range(2) should be preferred at all times if it's available, otherwise we'll use closefrom(2) if available with a fallback to fdwalk(3) or plain old loop over fd range in order of most efficient to least.

[note that this version does check for ENOSYS, but currently ignores all other errors]

Automerge-Triggered-By: @pablogsal
Misc/NEWS.d/next/C API/2020-10-11-19-17-44.bpo-40423.GsmgEj.rst [new file with mode: 0644]
Modules/posixmodule.c
configure
configure.ac
pyconfig.h.in