qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Use clean shutdown request for ctrl-a x


From: Fabien Chouteau
Subject: Re: [Qemu-devel] [PATCH] Use clean shutdown request for ctrl-a x
Date: Tue, 03 Jul 2012 17:07:46 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

On 07/03/2012 04:49 PM, Paolo Bonzini wrote:
> Il 03/07/2012 16:00, Peter Maydell ha scritto:
>> I was just talking on #qemu this morning about the equivalent question
>> of whether the ARM semihosting exit function ought to be doing a
>> qemu_system_shutdown_request rather than a plain exit()...
>>
>> The interesting question for the qemu-char case is whether the code that
>> feeds this magic byte to us is expecting it to have immediate effect
>> or is happy to continue execution and let us shut down with a slight
>> delay.
> 
> And also whether it is supposed to obey -no-shutdown...

I didn't know this option...

My goal is to make ctrl-a x to close Qemu in a clean way.
The current exit(0) skips a lot of cleanup/close functions, for
example in block drivers.

We can create a new shutdown function that will override the
-no-shutdown option to keep a consistent behavior with ctrl-a x.

void qemu_system_force_shutdown(void)
{
    no_shutdown = 0;
    qemu_system_shutdown_request();
}

-- 
Fabien Chouteau





reply via email to

[Prev in Thread] Current Thread [Next in Thread]