qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: "Alex Bennée" <alex.bennee@linaro.org>, qemu-devel@nongnu.org
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Lukas Jünger" <lukas.junger@greensocs.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [PATCH v2] chardev: don't exit() straight away on C-a x
Date: Tue, 19 Oct 2021 11:56:44 +0200	[thread overview]
Message-ID: <0d5955be-09ac-3581-a13f-f7f8eaa53790@redhat.com> (raw)
In-Reply-To: <20211019092901.1519570-1-alex.bennee@linaro.org>

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	other threads:[~2021-10-19 10:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-19  9:29 [PATCH v2] chardev: don't exit() straight away on C-a x Alex Bennée
2021-10-19  9:56 ` Philippe Mathieu-Daudé [this message]
2021-10-19 10:11 ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0d5955be-09ac-3581-a13f-f7f8eaa53790@redhat.com \
    --to=philmd@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=lukas.junger@greensocs.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).