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

index 3c0461fbfbc8fb3db9e75f3c91588579ecfb6558..ff81d0c7ca57a6a8137e3e56f1ace281ae4b8995 100644 (file)
@@ -1093,9 +1093,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);