This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Empty select() on windows gives error.
Type: Stage: resolved
Components: Windows Versions:
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Windows select() errors out when given no fds to select on, which breaks SelectSelector
View: 29256
Assigned To: Nosy List: Ralph Loader, martin.panter, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2019-04-25 21:01 by Ralph Loader, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg340862 - (view) Author: Ralph Loader (Ralph Loader) Date: 2019-04-25 21:01
The following one liner gives an error on windows but not on linux:

```
import selectors ; selectors.DefaultSelector().select(timeout=1)
```

It appears that the windows select() function with no FDs set gives an error but on Linux it is equivalent to a sleep.

The error on windows:
```
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files\Python37\lib\selectors.py", line 323, in select
    r, w, _ = self._select(self._readers, self._writers, [], timeout)
  File "C:\Program Files\Python37\lib\selectors.py", line 314, in _select
    r, w, x = select.select(r, w, w, timeout)
OSError: [WinError 10022] An invalid argument was supplied
```
msg340864 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2019-04-25 21:37
I think this is a duplicate of Issue 29256. Issue 25680 also discusses platform differences with no file descriptors.
History
Date User Action Args
2022-04-11 14:59:14adminsetgithub: 80907
2019-04-25 21:37:17martin.pantersetstatus: open -> closed

superseder: Windows select() errors out when given no fds to select on, which breaks SelectSelector

nosy: + martin.panter
messages: + msg340864
resolution: duplicate
stage: resolved
2019-04-25 21:01:32Ralph Loadercreate