Skip to content

Instantly share code, notes, and snippets.

@hamano
Created August 26, 2010 05:09
Show Gist options
  • Save hamano/550852 to your computer and use it in GitHub Desktop.
Save hamano/550852 to your computer and use it in GitHub Desktop.
diff --git a/vl.c b/vl.c
index fdee289..8b27654 100644
--- a/vl.c
+++ b/vl.c
@@ -4569,7 +4569,11 @@ int qemu_uuid_parse(const char *str, uint8_t *uuid)
static void termsig_handler(int signal)
{
- qemu_system_shutdown_request();
+ if(signal == SIGTERM){
+ qemu_system_powerdown_request();
+ }else{
+ qemu_system_shutdown_request();
+ }
}
static void sigchld_handler(int signal)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment