2019-01-17 22:28:12 +00:00
|
|
|
Origin: https://bugs.launchpad.net/qemu/+bug/1217339/comments/2
|
|
|
|
Origin: https://lists.nongnu.org/archive/html/qemu-devel/2017-03/msg03039.html
|
|
|
|
|
2020-08-12 20:50:52 +00:00
|
|
|
diff --git a/softmmu/vl.c b/softmmu/vl.c
|
2019-01-17 22:28:12 +00:00
|
|
|
index 1ad1c04637..9e07fe1dbb 100644
|
2020-08-12 20:50:52 +00:00
|
|
|
--- a/softmmu/vl.c
|
|
|
|
+++ b/softmmu/vl.c
|
2019-01-17 22:28:12 +00:00
|
|
|
@@ -1898,7 +1898,11 @@ void qemu_system_killed(int signal, pid_t pid)
|
|
|
|
/* Cannot call qemu_system_shutdown_request directly because
|
|
|
|
* we are in a signal handler.
|
|
|
|
*/
|
|
|
|
- shutdown_requested = SHUTDOWN_CAUSE_HOST_SIGNAL;
|
|
|
|
+ if (signal == SIGHUP) {
|
|
|
|
+ powerdown_requested = 1;
|
|
|
|
+ } else {
|
|
|
|
+ shutdown_requested = SHUTDOWN_CAUSE_HOST_SIGNAL;
|
|
|
|
+ }
|
|
|
|
qemu_notify_event();
|
|
|
|
}
|
|
|
|
|