qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Raymond <cerbere@gmail.com>
To: qemu-devel@nongnu.org
Cc: Alexandre Raymond <cerbere@gmail.com>,
	pbonzini@redhat.com, andreas.faerber@web.de, agraf@suse.de,
	jan.kiszka@siemens.com
Subject: [Qemu-devel] [PATCH] Fix signal handling when io-thread is disabled
Date: Mon, 13 Jun 2011 23:46:31 -0400	[thread overview]
Message-ID: <1308023191-7157-1-git-send-email-cerbere@gmail.com> (raw)

This fix effectively blocks, in the main thread, the signals handled
by signalfd or the compatibility signal thread.

This way, such signals are received synchronously in the main thread
through sigfd_handler() instead of triggering the signal handler
directly, asynchronously.

Signed-off-by: Alexandre Raymond <cerbere@gmail.com>
---
 cpus.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/cpus.c b/cpus.c
index 4ab76f0..b6366b5 100644
--- a/cpus.c
+++ b/cpus.c
@@ -411,6 +411,7 @@ static int qemu_signal_init(void)
         sigaddset(&set, SIGIO);
         sigaddset(&set, SIGALRM);
     }
+    pthread_sigmask(SIG_BLOCK, &set, NULL);
 #endif
 
     sigfd = qemu_signalfd(&set);
-- 
1.7.5

             reply	other threads:[~2011-06-14  3:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-14  3:46 Alexandre Raymond [this message]
2011-06-14  6:05 ` [Qemu-devel] [PATCH] Fix signal handling when io-thread is disabled Jan Kiszka
2011-06-14 14:10   ` Alexandre Raymond

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=1308023191-7157-1-git-send-email-cerbere@gmail.com \
    --to=cerbere@gmail.com \
    --cc=agraf@suse.de \
    --cc=andreas.faerber@web.de \
    --cc=jan.kiszka@siemens.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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;
as well as URLs for NNTP newsgroup(s).