lxc: return -1 if failed to kill lxc process

We missed a return when virProcessKillPainfully
failed to kill lxc process

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
This commit is contained in:
Chen Hanxiao 2013-12-13 16:30:36 +08:00 committed by Eric Blake
parent fca4f23340
commit 5ed324a205

View File

@ -711,7 +711,11 @@ int virLXCProcessStop(virLXCDriverPtr driver,
} else {
/* If cgroup doesn't exist, just try cleaning up the
* libvirt_lxc process */
virProcessKillPainfully(vm->pid, true);
if (virProcessKillPainfully(vm->pid, true) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Processes %d refused to die"), (int)vm->pid);
return -1;
}
}
virLXCProcessCleanup(driver, vm, reason);