All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>, Jan Kiszka <jan.kiszka@web.de>
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
	qemu-devel <qemu-devel@nongnu.org>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	Gonglei <arei.gonglei@hotmail.com>
Subject: Re: [Qemu-devel] [PATCH] Revert "main-loop.c: Handle SIGINT, SIGHUP and SIGTERM, synchronously"
Date: Mon, 27 Oct 2014 15:39:45 +0100	[thread overview]
Message-ID: <544E5931.9070301@redhat.com> (raw)
In-Reply-To: <CAFEAcA9XvzJmBhgbiynZXssoUOP9X1fBWNk+XfvjWRrLLtJQAQ@mail.gmail.com>



On 10/27/2014 03:18 PM, Peter Maydell wrote:
> On 26 October 2014 09:32, Jan Kiszka <jan.kiszka@web.de> wrote:
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> This reverts commit 15124e142034d21341ec9f1a304a1dc5a6c25681. It breaks
>> debuggability of qemu.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>>
>> Feel free to apply this before or after "Make qemu_shutdown_requested
>> signal-safe".
>>
>>  main-loop.c | 3 ---
>>  1 file changed, 3 deletions(-)
>>
>> diff --git a/main-loop.c b/main-loop.c
>> index d2e64f1..53393a4 100644
>> --- a/main-loop.c
>> +++ b/main-loop.c
>> @@ -84,9 +84,6 @@ static int qemu_signal_init(void)
>>      sigaddset(&set, SIGIO);
>>      sigaddset(&set, SIGALRM);
>>      sigaddset(&set, SIGBUS);
>> -    sigaddset(&set, SIGINT);
>> -    sigaddset(&set, SIGHUP);
>> -    sigaddset(&set, SIGTERM);
> 
> I'm planning to apply this patch but with the following
> comment added here:
>     /* Note that the SIGINT, SIGTERM and SIGHUP signals are not handled
>      * via signalfd, and so their handlers will still be invoked
>      * asynchronously. This is done so that ^C can be used to interrupt
>      * QEMU when it is being run under gdb.
>      */

What about:

    /* SIGINT cannot be handled via signalfd, so that ^C can be used
     * to interrupt QEMU when it is being run under gdb.  SIGHUP and
     * SIGTERM are also handled asynchronously, even though it is not
     * strictly necessary, because they use the same handler as SIGINT.
     */

> (which does make the commit not a pure revert).
> 
>>      pthread_sigmask(SIG_BLOCK, &set, NULL);
>>
>>      sigdelset(&set, SIG_IPI);
>> --
>> 1.8.4.5
> 
> thanks
> -- PMM
> 

  reply	other threads:[~2014-10-27 14:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-26  9:32 [Qemu-devel] [PATCH] Revert "main-loop.c: Handle SIGINT, SIGHUP and SIGTERM, synchronously" Jan Kiszka
2014-10-26  9:42 ` Gonglei
2014-10-27 14:18 ` Peter Maydell
2014-10-27 14:39   ` Paolo Bonzini [this message]
2014-10-27 15:05     ` Peter Maydell
2014-10-27 16:39       ` Peter Maydell

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=544E5931.9070301@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=arei.gonglei@hotmail.com \
    --cc=jan.kiszka@web.de \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.