]> xenbits.xensource.com Git - people/dariof/libvirt.git/commitdiff
lxc: return -1 if failed to kill lxc process
authorChen Hanxiao <chenhanxiao@cn.fujitsu.com>
Fri, 13 Dec 2013 08:30:36 +0000 (16:30 +0800)
committerEric Blake <eblake@redhat.com>
Fri, 13 Dec 2013 13:02:11 +0000 (06:02 -0700)
We missed a return when virProcessKillPainfully
failed to kill lxc process

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
src/lxc/lxc_process.c

index 131b5c1cc6129c64033099ed3c17a2d2b95de247..cc9c1a200b55f876cabd450e09e70066bb92cbdf 100644 (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);