From 7c8b745249f441359582bbd415223b1cf0a21e9a Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Tue, 16 Dec 2025 15:56:44 -0600 Subject: [PATCH] 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 --- libweston/compositor.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libweston/compositor.c b/libweston/compositor.c index 4b38cc2fd..f5f0aeaea 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -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