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 <dlezcano@fr.ibm.com>
This commit is contained in:
Daniel Lezcano 2010-02-26 21:12:31 +01:00 committed by Daniel Lezcano
parent d45fdd2707
commit 7d9fb3e9d2

View File

@ -261,6 +261,7 @@ void lxc_fini(const char *name, struct lxc_handler *handler)
void lxc_abort(const char *name, struct lxc_handler *handler) void lxc_abort(const char *name, struct lxc_handler *handler)
{ {
lxc_set_state(name, handler, ABORTING); lxc_set_state(name, handler, ABORTING);
if (handler->pid > 0)
kill(handler->pid, SIGKILL); kill(handler->pid, SIGKILL);
} }