[issue31334] select.poll.poll fails on BSDs with arbitrary negative timeouts

Riccardo Coccioli report at bugs.python.org
Mon Oct 16 09:19:50 EDT 2017


Riccardo Coccioli <rcoccioli at gmail.com> added the comment:

Although it's documented as -1 in Linux man page [1], from my quick tests I was not able to get any error with negative values different from -1 and it seems to wait indefinitely as expected. Looking also at its implementation in [2], it doesn't seem to differentiate between negative values. It could be argued that is implementation dependent at the moment and the behaviour might change in the future.
But, on a related note, the Python documentation doesn't say much either as what are acceptable values for the timeout parameter, see [3].

So at the moment there isn't any discrepancy between the Python documentation and the current behaviour IMHO, but I'm happy to open a separate task and send a PR if you think this should be improved/fixed too.

[1] http://man7.org/linux/man-pages/man2/epoll_wait.2.html
[2] http://elixir.free-electrons.com/linux/latest/source/fs/eventpoll.c#L1754
[3] https://docs.python.org/3.7/library/select.html

----------

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


More information about the Python-bugs-list mailing list