fix #4737: qmeventd: gracefully handle interrupted epoll_wait call

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
(cherry picked from commit 2d7a026e99)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Fiona Ebner 2023-05-24 12:30:58 +02:00 committed by Thomas Lamprecht
parent 7da9f115ae
commit 8d1d542a56

View File

@ -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++) {