public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH qemu-server] fix #4737: qmeventd: gracefully handle interrupted epoll_wait call
Date: Wed, 24 May 2023 12:30:58 +0200	[thread overview]
Message-ID: <20230524103058.95933-1-f.ebner@proxmox.com> (raw)

Signed-off-by: Fiona Ebner <f.ebner@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





             reply	other threads:[~2023-05-24 10:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-24 10:30 Fiona Ebner [this message]
2023-05-24 15:12 ` [pve-devel] applied: " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230524103058.95933-1-f.ebner@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal