From: Chen Hanxiao Date: Fri, 13 Dec 2013 08:30:36 +0000 (+0800) Subject: lxc: return -1 if failed to kill lxc process X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=5ed324a205bd034a1c74052a1baefb59bffaeb5d;p=libvirt.git 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 --- diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index 131b5c1cc6..cc9c1a200b 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -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);