Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PEP 475: handle EINTR in the select and selectors module #67673

Closed
vstinner opened this issue Feb 19, 2015 · 7 comments
Closed

PEP 475: handle EINTR in the select and selectors module #67673

vstinner opened this issue Feb 19, 2015 · 7 comments
Labels
extension-modules C modules in the Modules dir

Comments

@vstinner
Copy link
Member

BPO 23485
Nosy @vstinner, @vadmium, @koobs
Files
  • select_eintr.patch
  • 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 = None
    closed_at = <Date 2015-03-31.10:20:50.805>
    created_at = <Date 2015-02-19.13:32:55.616>
    labels = ['extension-modules']
    title = 'PEP 475: handle EINTR in the select and selectors module'
    updated_at = <Date 2015-04-20.09:31:06.576>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2015-04-20.09:31:06.576>
    actor = 'koobs'
    assignee = 'none'
    closed = True
    closed_date = <Date 2015-03-31.10:20:50.805>
    closer = 'vstinner'
    components = ['Extension Modules']
    creation = <Date 2015-02-19.13:32:55.616>
    creator = 'vstinner'
    dependencies = []
    files = ['38732']
    hgrepos = []
    issue_num = 23485
    keywords = ['patch']
    message_count = 7.0
    messages = ['236216', '239560', '239634', '239637', '239638', '239677', '239822']
    nosy_count = 5.0
    nosy_names = ['vstinner', 'neologix', 'python-dev', 'martin.panter', 'koobs']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue23485'
    versions = ['Python 3.5']

    @vstinner
    Copy link
    Member Author

    The implementation of the PEP-475 has to modify the following functions to restart on EINTR (and recompute the timeout):

    • select.select()
    • select.poll()
    • select.epoll.poll()
    • select.devpoll.poll()
    • select.kqueue.control()
    • selectors.SelectSelector.select() and other selector classes

    See also issues bpo-18885 and bpo-23285.

    @vstinner vstinner added the extension-modules C modules in the Modules dir label Feb 19, 2015
    @vstinner
    Copy link
    Member Author

    Ok, here is a first patch just for select.select().

    It took me some time to write this small patch, because I wanted first to push my new API to handle time in pytime.h (Issue bpo-22117). The new time C API has been merged.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Mar 30, 2015

    New changeset 0ff1090307c7 by Victor Stinner in branch 'default':
    Issue bpo-23485: select.select() is now retried automatically with the recomputed
    https://hg.python.org/cpython/rev/0ff1090307c7

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Mar 30, 2015

    New changeset 17b6d0d7da00 by Victor Stinner in branch 'default':
    Issue bpo-23485: Fix test_signal, select.select() now retries the syscall if the
    https://hg.python.org/cpython/rev/17b6d0d7da00

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Mar 30, 2015

    New changeset 0591cf5c9ebd by Victor Stinner in branch 'default':
    Issue bpo-23485: Add _PyTime_FromMillisecondsObject() function
    https://hg.python.org/cpython/rev/0591cf5c9ebd

    New changeset 69b1683ee001 by Victor Stinner in branch 'default':
    Issue bpo-23485: select.poll.poll() is now retried when interrupted by a signal
    https://hg.python.org/cpython/rev/69b1683ee001

    New changeset 5194a84ed9f3 by Victor Stinner in branch 'default':
    Issue bpo-23485: select.epoll.poll() is now retried when interrupted by a signal
    https://hg.python.org/cpython/rev/5194a84ed9f3

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Mar 31, 2015

    New changeset b017ca5d28bc by Victor Stinner in branch 'default':
    Issue bpo-23485: select.kqueue.control() is now retried when interrupted by a signal
    https://hg.python.org/cpython/rev/b017ca5d28bc

    New changeset f54bc2c52dfd by Victor Stinner in branch 'default':
    Issue bpo-23485: select.devpoll.poll() is now retried when interrupted by a signal
    https://hg.python.org/cpython/rev/f54bc2c52dfd

    New changeset 76d297869859 by Victor Stinner in branch 'default':
    Issue bpo-23485: Enhance and update selectors doc and test_selectors
    https://hg.python.org/cpython/rev/76d297869859

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Apr 1, 2015

    New changeset 65ac8e587bb0 by Victor Stinner in branch 'default':
    Issue bpo-22117, issue bpo-23485: Fix _PyTime_AsMilliseconds() and
    https://hg.python.org/cpython/rev/65ac8e587bb0

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    extension-modules C modules in the Modules dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant