[pve-devel] [PATCH qemu-server] fix #4737: qmeventd: gracefully handle interrupted epoll_wait call

Fiona Ebner f.ebner at proxmox.com
Wed May 24 12:30:58 CEST 2023


Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
 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++) {
-- 
2.39.2






More information about the pve-devel mailing list