From 2d7a026e99903c97ba68a6cfad14d354af1a8629 Mon Sep 17 00:00:00 2001 From: Fiona Ebner Date: Wed, 24 May 2023 12:30:58 +0200 Subject: [PATCH] fix #4737: qmeventd: gracefully handle interrupted epoll_wait call Signed-off-by: Fiona Ebner --- qmeventd/qmeventd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qmeventd/qmeventd.c b/qmeventd/qmeventd.c index 499376ae..a843da5f 100644 --- a/qmeventd/qmeventd.c +++ b/qmeventd/qmeventd.c @@ -687,6 +687,9 @@ main(int argc, char *argv[]) for(;;) { nevents = epoll_wait(epoll_fd, events, 1, needs_cleanup ? 10*1000 : -1); + if (nevents < 0 && errno == EINTR) { + continue; + } bail_neg(nevents, "epoll_wait"); for (int n = 0; n < nevents; n++) {