mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-21 05:33:45 -04:00
main: handle EINTR in poll()
This commit is contained in:
parent
50d455bd15
commit
dd5a3b1009
1 changed files with 3 additions and 0 deletions
3
main.c
3
main.c
|
|
@ -1016,6 +1016,9 @@ main(int argc, char *const *argv)
|
||||||
int ret = poll(fds, sizeof(fds) / sizeof(fds[0]), timeout_ms);
|
int ret = poll(fds, sizeof(fds) / sizeof(fds[0]), timeout_ms);
|
||||||
|
|
||||||
if (ret == -1) {
|
if (ret == -1) {
|
||||||
|
if (errno == EINTR)
|
||||||
|
continue;
|
||||||
|
|
||||||
LOG_ERRNO("failed to poll file descriptors");
|
LOG_ERRNO("failed to poll file descriptors");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue