qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Bug 1217339 <1217339@bugs.launchpad.net>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Bug 1217339] [NEW] SIGQUIT to send ACPI-shutdown to Guest
Date: Tue, 27 Aug 2013 16:38:37 +0200	[thread overview]
Message-ID: <521CB9ED.4030802@redhat.com> (raw)
In-Reply-To: <20130827122907.17435.24292.malonedeb@gac.canonical.com>

On 08/27/13 14:29, Lasse wrote:
> Public bug reported:
> 
> When qemu receives SIGQUIT, it should first try to run system_powerdown
> (giving the guest an ACPI signal to begin the shutdown process), before
> ending the whole qemu process.

I strongly disagree. SIGQUIT is an interactive debugging signal. It is
there so that the user running qemu can trigger a core dump from the
terminal, when he/she notices a problem.

http://www.gnu.org/software/libc/manual/html_node/Termination-Signals.html#index-SIGQUIT-2854

> At this point there is no way to do a graceful shutdown if you do not
> have access to the monitor and you do not use any wrapper like libvirt.
> 
> If, for some reason SIGQUIT would not be accepted as the signal, take
> any free to use signal, like SIGUSR1. There should be a way to get ACPI
> shutdown sent to the guest.

What's wrong with SIGINT / SIGTERM? Those signals are there to request a
clean shutdown (from the terminal and from an unrelated process,
respectively).

As far as I can see, both SIGINT and SIGTERM end up in
qemu_system_shutdown_request() on POSIX:

termsig_handler() [os-posix.c]
  qemu_system_killed() [vl.c]
    qemu_system_shutdown_request()

Laszlo

  reply	other threads:[~2013-08-27 14:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-27 12:29 [Qemu-devel] [Bug 1217339] [NEW] SIGQUIT to send ACPI-shutdown to Guest Lasse
2013-08-27 14:38 ` Laszlo Ersek [this message]
2017-01-23 17:26 ` [Qemu-devel] [Bug 1217339] " Thomas Huth
2017-03-14 16:29 ` WhiteWinterWolf
2017-03-14 17:03 ` Thomas Huth
2017-03-15 15:55 ` WhiteWinterWolf
2020-08-12 12:41 ` Laszlo Ersek (Red Hat)

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=521CB9ED.4030802@redhat.com \
    --to=lersek@redhat.com \
    --cc=1217339@bugs.launchpad.net \
    --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).