From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33359) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sm3er-0008S9-5U for qemu-devel@nongnu.org; Tue, 03 Jul 2012 10:00:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sm3ef-0007n8-Kp for qemu-devel@nongnu.org; Tue, 03 Jul 2012 10:00:48 -0400 Received: from mail-bk0-f45.google.com ([209.85.214.45]:44935) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sm3ef-0007kV-E0 for qemu-devel@nongnu.org; Tue, 03 Jul 2012 10:00:37 -0400 Received: by bkty12 with SMTP id y12so1866003bkt.4 for ; Tue, 03 Jul 2012 07:00:34 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1341322722-32691-1-git-send-email-chouteau@adacore.com> References: <1341322722-32691-1-git-send-email-chouteau@adacore.com> Date: Tue, 3 Jul 2012 15:00:34 +0100 Message-ID: From: Peter Maydell Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH] Use clean shutdown request for ctrl-a x List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fabien Chouteau Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org On 3 July 2012 14:38, Fabien Chouteau wrote: > > Signed-off-by: Fabien Chouteau > --- > qemu-char.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/qemu-char.c b/qemu-char.c > index c2aaaee..1f43c95 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_shutdown_request(); > break; > } > case 's': > -- > 1.7.9.5 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. -- PMM