mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
fdm: keep polling on EINTR
This commit is contained in:
parent
903a8eaf4a
commit
15b35b7641
1 changed files with 5 additions and 4 deletions
9
fdm.c
9
fdm.c
|
|
@ -324,11 +324,12 @@ fdm_poll(struct fdm *fdm)
|
|||
|
||||
struct epoll_event events[tll_length(fdm->fds)];
|
||||
|
||||
int r = epoll_wait(fdm->epoll_fd, events, tll_length(fdm->fds), -1);
|
||||
if (r == -1) {
|
||||
if (errno == EINTR)
|
||||
return true;
|
||||
int r;
|
||||
do {
|
||||
r = epoll_wait(fdm->epoll_fd, events, tll_length(fdm->fds), -1);
|
||||
} while (unlikely(r < 0 && errno == EINTR));
|
||||
|
||||
if (r < 0) {
|
||||
LOG_ERRNO("failed to epoll");
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue