]> git.tuebingen.mpg.de Git - paraslash.git/commit
interactive: Avoid select(2) in input_available().
authorAndre Noll <maan@tuebingen.mpg.de>
Wed, 29 Sep 2021 20:29:51 +0000 (22:29 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Thu, 25 Aug 2022 13:37:26 +0000 (15:37 +0200)
commit5f04eea3b1c9a41417ed63e5348b2aabca5542fa
tree770267a5bf4f93cc74a945111db7b1496e5a3b94
parentf23a3bd46a21cae3749ff6c3d6459e119d4cee89
interactive: Avoid select(2) in input_available().

In analogy to write_ok(), introduce read_ok() which uses poll(2)
rather than select(2). To avoid duplications, abstract out the common
code to the new xpoll() helper.

We could avoid the timeout parameter of xpoll() at this point because
both callers call it with a zero timeout (causing poll() to return
immediately), but later patches introduce other callers which specify
non-zero timeouts.
fd.c
fd.h
interactive.c