classification
Title: PEP 475: handle EINTR in the select and selectors module
Type: Stage:
Components: Extension Modules Versions: Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: koobs, martin.panter, neologix, python-dev, vstinner
Priority: normal Keywords: patch

Created on 2015-02-19 13:32 by vstinner, last changed 2015-04-20 09:31 by koobs. This issue is now closed.

Files
File name Uploaded Description Edit
select_eintr.patch vstinner, 2015-03-30 02:13 review
Messages (7)
msg236216 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-02-19 13:32
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 #18885 and #23285.
msg239560 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-03-30 02:13
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 #22117). The new time C API has been merged.
msg239634 - (view) Author: Roundup Robot (python-dev) Date: 2015-03-30 19:29
New changeset 0ff1090307c7 by Victor Stinner in branch 'default':
Issue #23485: select.select() is now retried automatically with the recomputed
https://hg.python.org/cpython/rev/0ff1090307c7
msg239637 - (view) Author: Roundup Robot (python-dev) Date: 2015-03-30 20:10
New changeset 17b6d0d7da00 by Victor Stinner in branch 'default':
Issue #23485: Fix test_signal, select.select() now retries the syscall if the
https://hg.python.org/cpython/rev/17b6d0d7da00
msg239638 - (view) Author: Roundup Robot (python-dev) Date: 2015-03-30 20:16
New changeset 0591cf5c9ebd by Victor Stinner in branch 'default':
Issue #23485: Add _PyTime_FromMillisecondsObject() function
https://hg.python.org/cpython/rev/0591cf5c9ebd

New changeset 69b1683ee001 by Victor Stinner in branch 'default':
Issue #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 #23485: select.epoll.poll() is now retried when interrupted by a signal
https://hg.python.org/cpython/rev/5194a84ed9f3
msg239677 - (view) Author: Roundup Robot (python-dev) Date: 2015-03-31 10:17
New changeset b017ca5d28bc by Victor Stinner in branch 'default':
Issue #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 #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 #23485: Enhance and update selectors doc and test_selectors
https://hg.python.org/cpython/rev/76d297869859
msg239822 - (view) Author: Roundup Robot (python-dev) Date: 2015-04-01 15:51
New changeset 65ac8e587bb0 by Victor Stinner in branch 'default':
Issue #22117, issue #23485: Fix _PyTime_AsMilliseconds() and
https://hg.python.org/cpython/rev/65ac8e587bb0
History
Date User Action Args
2015-04-20 09:31:06koobssetnosy: + koobs
2015-04-01 15:51:12python-devsetmessages: + msg239822
2015-03-31 10:20:50vstinnersetstatus: open -> closed
resolution: fixed
2015-03-31 10:17:46python-devsetmessages: + msg239677
2015-03-30 20:16:01python-devsetmessages: + msg239638
2015-03-30 20:10:12python-devsetmessages: + msg239637
2015-03-30 19:29:11python-devsetnosy: + python-dev
messages: + msg239634
2015-03-30 02:13:34vstinnersetfiles: + select_eintr.patch
keywords: + patch
messages: + msg239560
2015-03-12 15:51:50vstinnerlinkissue23648 dependencies
2015-03-02 02:42:20martin.pantersetnosy: + martin.panter
2015-02-19 13:32:55vstinnercreate