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:
Mark McLoughlin 2007-02-19 17:00:05 +00:00
parent 272639aaac
commit 96b89415a3
2 changed files with 43 additions and 40 deletions

View File

@ -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.

View File

@ -81,8 +81,18 @@ static int qemudDispatchSignal(struct qemud_server *server)
return -1;
}
qemudLog(QEMUD_INFO, "Received signal %d; shuting down guests and "
"networks and purging config", sigc);
ret = 0;
switch (sigc) {
case SIGHUP:
qemudLog(QEMUD_INFO, "Reloading configuration on SIGHUP");
ret = qemudScanConfigs(server);
break;
case SIGINT:
case SIGQUIT:
case SIGTERM:
qemudLog(QEMUD_WARN, "Shutting down on signal %d", sigc);
/* shutdown active VMs */
vm = server->activevms;
@ -120,18 +130,6 @@ static int qemudDispatchSignal(struct qemud_server *server)
server->inactivenetworks = NULL;
server->ninactivenetworks = 0;
ret = 0;
switch (sigc) {
case SIGHUP:
qemudLog(QEMUD_INFO, "Reloading configuration");
ret = qemudScanConfigs(server);
break;
case SIGINT:
case SIGQUIT:
case SIGTERM:
qemudLog(QEMUD_WARN, "Shutting down on signal %d", sigc);
server->shutdown = 1;
break;