qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2] chardev: don't exit() straight away on C-a x


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v2] chardev: don't exit() straight away on C-a x
Date: Tue, 19 Oct 2021 11:56:44 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0

On 10/19/21 11:29, Alex Bennée wrote:
> While there are a number of uses in the code-base of the exit(0)
> pattern it gets in the way of clean exit which can do all of it's
> house-keeping. In particular it was reported that you can crash
> plugins this way because TCG can still be running on other threads
> when the atexit callback is called.
> 
> Use qmp_quit() instead which takes care of some housekeeping before
> triggering the shutdown.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Reported-by: Lukas Jünger <lukas.junger@greensocs.com>
> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Message-Id: <20211018140226.838137-1-alex.bennee@linaro.org>
> 
> ---
> v2
>   - use qmp_quit instead of direct qemu_system_shutdown_request
>   - g_assert_not_reached() for the stub definition
> ---
>  chardev/char-mux.c | 3 ++-
>  stubs/qmp-quit.c   | 8 ++++++++
>  stubs/meson.build  | 1 +
>  3 files changed, 11 insertions(+), 1 deletion(-)
>  create mode 100644 stubs/qmp-quit.c

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>




reply via email to

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