[New-bugs-announce] [issue35310] select which was interrupted by EINTR isn't re-run if the timeout has passed

Brian Maissy report at bugs.python.org
Sun Nov 25 08:19:06 EST 2018


New submission from Brian Maissy <brian at medigate.io>:

If a call to select.select() was interrupted by a signal and the select syscall set an errno of EINTR, then under PEP 475 the select call should be re-executed.

If, however, there is a signal handler which takes enough time that the select's timeout expires, select() is not retried, and the rlist is returned as-is (with fds in it which are not ready for reading).

Under this condition, either select() should be re-run with a timeout of 0, or the fd lists should be emptied before returning.

Example code which reproduces the problem attached.

----------
files: select_eintr.py
messages: 330388
nosy: Brian Maissy
priority: normal
severity: normal
status: open
title: select which was interrupted by EINTR isn't re-run if the timeout has passed
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8
Added file: https://bugs.python.org/file47945/select_eintr.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35310>
_______________________________________


More information about the New-bugs-announce mailing list