]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
start: pidfds obviously start - like any fd - at 0 3150/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Fri, 4 Oct 2019 08:31:41 +0000 (10:31 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Fri, 4 Oct 2019 08:31:41 +0000 (10:31 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/start.c

index e6544ea19c530a28b5dce5fd6d82ec9575285c40..32267b773a93578b598affaa36916331c667b0fa 100644 (file)
@@ -1112,9 +1112,9 @@ void lxc_abort(const char *name, struct lxc_handler *handler)
 
        lxc_set_state(name, handler, ABORTING);
 
-       if (handler->pidfd > 0)
+       if (handler->pidfd >= 0)
                ret = lxc_raw_pidfd_send_signal(handler->pidfd, SIGKILL, NULL, 0);
-       else if (handler->proc_pidfd > 0)
+       else if (handler->proc_pidfd >= 0)
                ret = lxc_raw_pidfd_send_signal(handler->proc_pidfd, SIGKILL, NULL, 0);
        else if (handler->pid > 0)
                ret = kill(handler->pid, SIGKILL);