← 输入框|bugs.python.org|刷新

➜

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
标题: Use fdwalk() within os.closerange() impl if available
类型: performance Stage: resolved
Components: Demos and Tools Versions: Python 3.9, Python 3.8
process
状态: closed Resolution: fixed
Dependencies: 后续:
分配给: gregory.p.smith 抄送列表: gregory.p.smith, iritkatriel, miss-islington
优先级: normal 关键字: patch

Created on 2019-09-11 13:40 by gregory.p.smith, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 15224 merged kulikjak, 2019-09-11 13:40
PR 15978 merged miss-islington, 2019-09-11 15:12
Messages (6)
msg351875 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) 日期: 2019-09-11 13:40
On POSIX platforms that support the fdwalk() API, use it within the os.closerange() implementation.
msg351890 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) 日期: 2019-09-11 14:10
contribution from Jakub Kulík (see the PR)
msg351927 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) 日期: 2019-09-11 15:11
"""On Solaris, we are patching (for many years now) `posix_closerange` function to use `fdwalk` to close file descriptors instead of a for loop. While for a long time only Solaris had `fdwalk`, but if I am not mistaken, some other OSes implement it today as well and as such others might be interested in this as well.

If you will like it, I can create an issue for that. Also, I am not sure whether `_fdwalk_close_func` needs a clinic part or if configure detection is sufficient this way - I am open to all comments and ideas and can rewrite it as needed ;).

""" - Jakub
msg351928 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) 日期: 2019-09-11 15:12
New changeset e20134f889a0cfcc37a46979f31a1c98b800de07 by Gregory P. Smith (Jakub Kulík) in branch 'master':
bpo-38110: Use fdwalk for os.closerange() when available. (GH-15224)
https://github.com/python/cpython/commit/e20134f889a0cfcc37a46979f31a1c98b800de07
msg352113 - (view) Author: miss-islington (miss-islington) 日期: 2019-09-12 11:19
New changeset 84eb42e3c90c03f13262f19185b14566e10941ac by Miss Islington (bot) in branch '3.8':
bpo-38110: Use fdwalk for os.closerange() when available. (GH-15224)
https://github.com/python/cpython/commit/84eb42e3c90c03f13262f19185b14566e10941ac
msg378375 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) 日期: 2020-10-10 10:29
This seems complete, can it be closed?
历史
日期 用户 动作 参数
2022-04-11 14:59:20admin修改github: 82291
2020-10-11 19:23:32gregory.p.smith修改状态: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-10-10 10:29:36iritkatriel修改抄送: + iritkatriel
消息: + msg378375
2019-09-12 11:19:24miss-islington修改抄送: + miss-islington
消息: + msg352113
2019-09-11 15:12:08miss-islington修改pull_requests: + pull_request15611
2019-09-11 15:12:01gregory.p.smith修改消息: + msg351928
2019-09-11 15:11:10gregory.p.smith修改消息: + msg351927
2019-09-11 14:10:06gregory.p.smith修改assignee: gregory.p.smith
消息: + msg351890
2019-09-11 13:40:16kulikjak修改keywords: + patch
pull_requests: + pull_request15581
2019-09-11 13:40:01gregory.p.smith创建