Skip to content

Use fdwalk() within os.closerange() impl if available #82291

Closed

Description

@gpshead
BPO 38110
Nosy @gpshead, @miss-islington, @iritkatriel
PRs
  • bpo-38110: Use fdwalk for os.closerange() when available. #15224
  • [3.8] bpo-38110: Use fdwalk for os.closerange() when available. (GH-15224) #15978
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/gpshead'
    closed_at = <Date 2020-10-11.19:23:32.320>
    created_at = <Date 2019-09-11.13:40:01.508>
    labels = ['3.8', '3.9', 'performance']
    title = 'Use fdwalk() within os.closerange() impl if available'
    updated_at = <Date 2020-10-11.19:23:32.319>
    user = 'https://github.com/gpshead'

    bugs.python.org fields:

    activity = <Date 2020-10-11.19:23:32.319>
    actor = 'gregory.p.smith'
    assignee = 'gregory.p.smith'
    closed = True
    closed_date = <Date 2020-10-11.19:23:32.320>
    closer = 'gregory.p.smith'
    components = ['Demos and Tools']
    creation = <Date 2019-09-11.13:40:01.508>
    creator = 'gregory.p.smith'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 38110
    keywords = ['patch']
    message_count = 6.0
    messages = ['351875', '351890', '351927', '351928', '352113', '378375']
    nosy_count = 3.0
    nosy_names = ['gregory.p.smith', 'miss-islington', 'iritkatriel']
    pr_nums = ['15224', '15978']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'performance'
    url = 'https://bugs.python.org/issue38110'
    versions = ['Python 3.8', 'Python 3.9']

    Activity

    1. gpshead commented on Sep 11, 2019

      @gpshead
      MemberAuthor

      On POSIX platforms that support the fdwalk() API, use it within the os.closerange() implementation.

    2. gpshead commented on Sep 11, 2019

      @gpshead
      MemberAuthor

      contribution from Jakub Kulík (see the PR)

    3. self-assigned this
      on Sep 11, 2019
    4. gpshead commented on Sep 11, 2019

      @gpshead
      MemberAuthor

      """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

    5. gpshead commented on Sep 11, 2019

      @gpshead
      MemberAuthor

      New changeset e20134f by Gregory P. Smith (Jakub Kulík) in branch 'master':
      bpo-38110: Use fdwalk for os.closerange() when available. (GH-15224)
      e20134f

    6. miss-islington commented on Sep 12, 2019

      @miss-islington
      Contributor

      New changeset 84eb42e by Miss Islington (bot) in branch '3.8':
      bpo-38110: Use fdwalk for os.closerange() when available. (GH-15224)
      84eb42e

    7. iritkatriel commented on Oct 10, 2020

      @iritkatriel
      Member

      This seems complete, can it be closed?

    8. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions