From: Christian Brauner Date: Sun, 18 Feb 2018 23:18:08 +0000 (+0100) Subject: start: lxc_abort() X-Git-Tag: lxc-2.0.10~254 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66fe45774d091bf78259fda2d466ad92e5e7532e;p=thirdparty%2Flxc.git start: lxc_abort() Signed-off-by: Christian Brauner --- diff --git a/src/lxc/start.c b/src/lxc/start.c index 510ba9079..19383f649 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -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) { ; }