From: Christian Brauner Date: Sun, 18 Feb 2018 23:18:08 +0000 (+0100) Subject: start: lxc_abort() X-Git-Tag: lxc-3.0.0.beta1~22^2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e4f9d51691f0f1a72181c2386932f2e3c414598;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 6c1a50679..59b30ed86 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -983,8 +983,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) { ; }