]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Fri Feb 19 16:59:18 IST 2007 Mark McLoughlin <markmc@redhat.com>
authorMark McLoughlin <markmc@redhat.com>
Mon, 19 Feb 2007 17:00:05 +0000 (17:00 +0000)
committerMark McLoughlin <markmc@redhat.com>
Mon, 19 Feb 2007 17:00:05 +0000 (17:00 +0000)
        * qemud/qemud.c: don't shutdown guest and networks on
        SIGHUP

ChangeLog
qemud/qemud.c

index 205e4bb884f12c9bcb891413328c34867c0d7803..0734cb07a46405d6e5cb766267a4249d21b6c24c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Feb 19 16:59:18 IST 2007 Mark McLoughlin <markmc@redhat.com>
+
+       * qemud/qemud.c: don't shutdown guest and networks on
+       SIGHUP
+       
 Fri Feb 19 16:58:53 IST 2007 Mark McLoughlin <markmc@redhat.com>
 
        * qemud/qemud.c: handle SIGQUIT.
index 0408ea65fdd4fdc37b69be32c410682a1d35a31c..9d6ed4ad5c1de91c60c77e37988c664526a3f20d 100644 (file)
@@ -81,50 +81,11 @@ static int qemudDispatchSignal(struct qemud_server *server)
         return -1;
     }
 
-    qemudLog(QEMUD_INFO, "Received signal %d; shuting down guests and "
-             "networks and purging config", sigc);
-
-    /* shutdown active VMs */
-    vm = server->activevms;
-    while (vm) {
-        struct qemud_vm *next = vm->next;
-        qemudShutdownVMDaemon(server, vm);
-        vm = next;
-    }
-
-    /* free inactive VMs */
-    vm = server->inactivevms;
-    while (vm) {
-        struct qemud_vm *next = vm->next;
-        qemudFreeVM(vm);
-        vm = next;
-    }
-    server->inactivevms = NULL;
-    server->ninactivevms = 0;
-
-    /* shutdown active networks */
-    network = server->activenetworks;
-    while (network) {
-        struct qemud_network *next = network->next;
-        qemudShutdownNetworkDaemon(server, network);
-        network = next;
-    }
-
-    /* free inactive networks */
-    network = server->inactivenetworks;
-    while (network) {
-        struct qemud_network *next = network->next;
-        qemudFreeNetwork(network);
-        network = next;
-    }
-    server->inactivenetworks = NULL;
-    server->ninactivenetworks = 0;
-
     ret = 0;
 
     switch (sigc) {
     case SIGHUP:
-        qemudLog(QEMUD_INFO, "Reloading configuration");
+        qemudLog(QEMUD_INFO, "Reloading configuration on SIGHUP");
         ret = qemudScanConfigs(server);
         break;
 
@@ -132,6 +93,43 @@ static int qemudDispatchSignal(struct qemud_server *server)
     case SIGQUIT:
     case SIGTERM:
         qemudLog(QEMUD_WARN, "Shutting down on signal %d", sigc);
+
+        /* shutdown active VMs */
+        vm = server->activevms;
+        while (vm) {
+            struct qemud_vm *next = vm->next;
+            qemudShutdownVMDaemon(server, vm);
+            vm = next;
+        }
+
+        /* free inactive VMs */
+        vm = server->inactivevms;
+        while (vm) {
+            struct qemud_vm *next = vm->next;
+            qemudFreeVM(vm);
+            vm = next;
+        }
+        server->inactivevms = NULL;
+        server->ninactivevms = 0;
+
+        /* shutdown active networks */
+        network = server->activenetworks;
+        while (network) {
+            struct qemud_network *next = network->next;
+            qemudShutdownNetworkDaemon(server, network);
+            network = next;
+        }
+
+        /* free inactive networks */
+        network = server->inactivenetworks;
+        while (network) {
+            struct qemud_network *next = network->next;
+            qemudFreeNetwork(network);
+            network = next;
+        }
+        server->inactivenetworks = NULL;
+        server->ninactivenetworks = 0;
+
         server->shutdown = 1;
         break;