On 3 July 2012 14:38, Fabien Chouteau <chout...@adacore.com> wrote:
>
> Signed-off-by: Fabien Chouteau <chout...@adacore.com>
> ---
>  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