]> 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>
Wed, 21 Feb 2018 17:08:26 +0000 (18:08 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/start.c

index 510ba90790a073c09594635ff43022ef33dbb4c9..19383f649450df37e87cff7fd87dd9c3dbbe046b 100644 (file)
@@ -952,8 +952,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) {
                ;
        }