From 7d9fb3e9d2b9722040f37f0e01e29d071f4c6fe8 Mon Sep 17 00:00:00 2001 From: Daniel Lezcano Date: Fri, 26 Feb 2010 21:12:31 +0100 Subject: [PATCH] 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 --- src/lxc/start.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 {