compositor: Check for EINTR reading timerfd

It's technically correct this way, and it also squashes an unused result
warning.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2025-12-16 15:56:44 -06:00
parent 85d8c7a5e5
commit 7c8b745249

View file

@ -4156,8 +4156,14 @@ output_repaint_timer_handler(int fd, uint32_t mask, void *data)
struct timespec now;
int ret = 0;
uint64_t e;
ssize_t size;
read(compositor->repaint_timer_fd, &e, sizeof e);
do {
size = read(compositor->repaint_timer_fd, &e, sizeof e);
} while (size < 0 && errno == EINTR);
if (size < 0)
weston_log("repaint timer read failed: %s\n", strerror(errno));
/* We may have transactions with constraints that cleared after
* the last repaint. That repaint would have unconditionally