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

2018-11-26 Thread Brian Maissy
Change by Brian Maissy : -- nosy: +oranav ___ Python tracker <https://bugs.python.org/issue35310> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2018-11-26 Thread Brian Maissy
Brian Maissy added the comment: The current behavior is: > select() is not retried, and the rlist is returned as-is (with fds in it > which are not ready for reading) Yes, this is a bug. It results in select() indicating that fd are ready for reading when they, i

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

2018-11-25 Thread Brian Maissy
Brian Maissy added the comment: I believe the offending line in the source is this break statement: https://github.com/python/cpython/blob/master/Modules/selectmodule.c#L339 -- ___ Python tracker <https://bugs.python.org/issue35

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

2018-11-25 Thread Brian Maissy
New submission from Brian Maissy : 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