From: Christian Brauner Date: Fri, 4 Oct 2019 08:31:41 +0000 (+0200) Subject: start: pidfds obviously start - like any fd - at 0 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1af01b93c9320f57c25fe7f059fbbd3bcb5e5b72;p=thirdparty%2Flxc.git start: pidfds obviously start - like any fd - at 0 Signed-off-by: Christian Brauner --- diff --git a/src/lxc/start.c b/src/lxc/start.c index 3c0461fbf..ff81d0c7c 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -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);