From 59b3bc264cbf0996cd7b446afd219ab1ff0fe53c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= Date: Fri, 7 Sep 2012 10:50:36 -0400 Subject: [PATCH] Remove zombie_handler from python-lxc code This code was addeed to deal with stopped/dead containers but really shouldn't be implemented there. Instead the setsid() call in start() should be enough to prevent python from getting the SIGCHLD and having to deal with it. --- src/python-lxc/lxc.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/python-lxc/lxc.c b/src/python-lxc/lxc.c index f58a954de..529278cd0 100644 --- a/src/python-lxc/lxc.c +++ b/src/python-lxc/lxc.c @@ -59,14 +59,6 @@ convert_tuple_to_char_pointer_array(PyObject *argv) { return result; } -void zombie_handler(int sig) -{ - signal(SIGCHLD,zombie_handler); - int status; - - waitpid(-1, &status, WNOHANG); -} - static void Container_dealloc(Container* self) { @@ -353,7 +345,6 @@ Container_start(Container *self, PyObject *args, PyObject *kwds) } } - signal(SIGCHLD, zombie_handler); self->container->want_daemonize(self->container); if (self->container->start(self->container, init_useinit, init_args)) {