mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-26 18:41:17 +00:00
Fri Feb 19 16:59:18 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/qemud.c: don't shutdown guest and networks on SIGHUP
This commit is contained in:
parent
272639aaac
commit
96b89415a3
@ -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>
|
Fri Feb 19 16:58:53 IST 2007 Mark McLoughlin <markmc@redhat.com>
|
||||||
|
|
||||||
* qemud/qemud.c: handle SIGQUIT.
|
* qemud/qemud.c: handle SIGQUIT.
|
||||||
|
@ -81,50 +81,11 @@ static int qemudDispatchSignal(struct qemud_server *server)
|
|||||||
return -1;
|
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;
|
ret = 0;
|
||||||
|
|
||||||
switch (sigc) {
|
switch (sigc) {
|
||||||
case SIGHUP:
|
case SIGHUP:
|
||||||
qemudLog(QEMUD_INFO, "Reloading configuration");
|
qemudLog(QEMUD_INFO, "Reloading configuration on SIGHUP");
|
||||||
ret = qemudScanConfigs(server);
|
ret = qemudScanConfigs(server);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -132,6 +93,43 @@ static int qemudDispatchSignal(struct qemud_server *server)
|
|||||||
case SIGQUIT:
|
case SIGQUIT:
|
||||||
case SIGTERM:
|
case SIGTERM:
|
||||||
qemudLog(QEMUD_WARN, "Shutting down on signal %d", sigc);
|
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;
|
server->shutdown = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user