Origin: https://bugs.launchpad.net/qemu/+bug/1217339/comments/2 Origin: https://lists.nongnu.org/archive/html/qemu-devel/2017-03/msg03039.html diff --git a/softmmu/vl.c b/softmmu/vl.c index 1ad1c04637..9e07fe1dbb 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -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(); }