Am 09.07.2012 12:19, schrieb Fabien Chouteau:
> Any comment?
> 
> On 07/04/2012 01:04 PM, Fabien Chouteau wrote:
>> The 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.
>>
>> Signed-off-by: Fabien Chouteau <chout...@adacore.com>
>> ---
>>  qemu-char.c |    2 +-
>>  sysemu.h    |    1 +
>>  vl.c        |    5 +++++
>>  3 files changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/qemu-char.c b/qemu-char.c
>> index c2aaaee..7732846 100644
>> --- a/qemu-char.c
>> +++ b/qemu-char.c
>> @@ -353,7 +353,7 @@ static int mux_proc_byte(CharDriverState *chr, MuxDriver 
>> *d, int ch)
>>              {
>>                   const char *term =  "QEMU: Terminated\n\r";
>>                   chr->chr_write(chr,(uint8_t *)term,strlen(term));
>> -                 exit(0);
>> +                 qemu_system_force_shutdown();
>>                   break;
>>              }
>>          case 's':

FWIW there was a recent patch by Hervé that exposed further occurrences
of exit(), probably all would need to be reviewed and fixed.

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



Reply via email to