]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
fix kill -1 process
authorDaniel Lezcano <daniel.lezcano@free.fr>
Fri, 26 Feb 2010 20:12:31 +0000 (21:12 +0100)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Fri, 26 Feb 2010 20:12:31 +0000 (21:12 +0100)
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>
src/lxc/start.c

index dcd587b82d01df2b5169455073c6ed6e0068df2d..d57d027fa9ffddcfbe026cdaf50c69258c9578ab 100644 (file)
@@ -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 {