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: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] Use clean shutdown request for ctrl-a x
Date: Tue, 3 Jul 2012 15:00:34 +0100

On 3 July 2012 14:38, Fabien Chouteau <address@hidden> wrote:
>
> Signed-off-by: Fabien Chouteau <address@hidden>
> ---
>  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



reply via email to

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