From: Daniel Lezcano Date: Fri, 26 Feb 2010 20:12:31 +0000 (+0100) Subject: fix kill -1 process X-Git-Tag: lxc-0.7.0~122 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d9fb3e9d2b9722040f37f0e01e29d071f4c6fe8;p=thirdparty%2Flxc.git fix kill -1 process In the process of rollbacking, the handler->pid is not set we must not kill it. Otherwsise, kill(-1, SIGKILL), ouch ! ... Signed-off-by: Daniel Lezcano --- diff --git a/src/lxc/start.c b/src/lxc/start.c index dcd587b82..d57d027fa 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -261,7 +261,8 @@ void lxc_fini(const char *name, struct lxc_handler *handler) void lxc_abort(const char *name, struct lxc_handler *handler) { lxc_set_state(name, handler, ABORTING); - kill(handler->pid, SIGKILL); + if (handler->pid > 0) + kill(handler->pid, SIGKILL); } struct start_arg {