]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
start: lxc_abort()
authorChristian Brauner <christian.brauner@ubuntu.com>
Sun, 18 Feb 2018 23:18:08 +0000 (00:18 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sun, 18 Feb 2018 23:18:08 +0000 (00:18 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/start.c

index 6c1a50679ad39d40da99b40be2fb6c6ae1b68e60..59b30ed8639fe66d6e5c3854f5e22da65a46ba98 100644 (file)
@@ -983,8 +983,13 @@ void lxc_abort(const char *name, struct lxc_handler *handler)
        int ret, status;
 
        lxc_set_state(name, handler, ABORTING);
-       if (handler->pid > 0)
-               kill(handler->pid, SIGKILL);
+
+       if (handler->pid > 0) {
+               ret = kill(handler->pid, SIGKILL);
+               if (ret < 0)
+                       SYSERROR("Failed to send SIGKILL to %d", handler->pid);
+       }
+
        while ((ret = waitpid(-1, &status, 0)) > 0) {
                ;
        }