From: Jan Kiszka <jan.kiszka@siemens.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [5055] Handle terminating signals (Gerd Hoffmann)
Date: Tue, 02 Sep 2008 13:21:06 +0200 [thread overview]
Message-ID: <48BD21A2.3020007@siemens.com> (raw)
In-Reply-To: <48AE9963.5040603@siemens.com>
Jan Kiszka wrote:
> Anthony Liguori wrote:
>> Revision: 5055
>> http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5055
>> Author: aliguori
>> Date: 2008-08-21 20:08:03 +0000 (Thu, 21 Aug 2008)
>>
>> Log Message:
>> -----------
>> Handle terminating signals (Gerd Hoffmann)
>>
>> This patch makes qemu handle signals better. It sets the request_shutdown
>> flag, making the main_loop exit and qemu taking the usual exit route, with
>> atexit handlers being called and so on, instead of qemu just being killed
>> by the signal.
>>
>> To avoid calling vm_start() from the signal handler main_loop() got an
>> additional check so qemu_system_shutdown_request() works even when the
>> vm is in stopped state.
>>
>> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
>> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
>>
>
> ...
>
>> Modified: trunk/vl.c
>> ===================================================================
>> --- trunk/vl.c 2008-08-21 19:33:09 UTC (rev 5054)
>> +++ trunk/vl.c 2008-08-21 20:08:03 UTC (rev 5055)
>> @@ -7621,6 +7621,8 @@
>> timeout = 0;
>> }
>> } else {
>> + if (shutdown_requested)
>> + break;
>> timeout = 10;
>> }
>> #ifdef CONFIG_PROFILER
>
> Could we define the policy that no patch is merged which introduces new
> compiler warnings? Fix below remove the one caused by the hunk above,
> but it still leaves some doubts for the semi-informed reader because the
> "if (shutdown_requested)" block under vm_running also checks for
> no_shutdown. Please confirm that leaving it out here was by intention.
>
> Jan
>
> --------
>
> Always return EXCP_INTERRUPT when leaving main_loop due to
> shutdown_requested.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> vl.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> Index: b/vl.c
> ===================================================================
> --- a/vl.c
> +++ b/vl.c
> @@ -7624,8 +7624,10 @@ static int main_loop(void)
> timeout = 0;
> }
> } else {
> - if (shutdown_requested)
> + if (shutdown_requested) {
> + ret = EXCP_INTERRUPT;
> break;
> + }
> timeout = 10;
> }
> #ifdef CONFIG_PROFILER
After discussing how this issue slipped in, I think it was forgotten to
actually merge the fix... :->
Jan
--
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
prev parent reply other threads:[~2008-09-02 11:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-21 20:08 [Qemu-devel] [5055] Handle terminating signals (Gerd Hoffmann) Anthony Liguori
2008-08-22 10:48 ` [Qemu-devel] " Jan Kiszka
2008-08-22 11:32 ` Gerd Hoffmann
2008-08-22 11:55 ` Jan Kiszka
2008-08-22 12:06 ` Gerd Hoffmann
2008-08-22 13:21 ` Jan Kiszka
2008-08-22 12:52 ` Anthony Liguori
2008-08-22 13:20 ` Jan Kiszka
2008-08-22 13:50 ` Anthony Liguori
2008-09-02 11:21 ` Jan Kiszka [this message]
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=48BD21A2.3020007@siemens.com \
--to=jan.kiszka@siemens.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 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.