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.
This commit is contained in:
Stéphane Graber 2012-09-07 10:50:36 -04:00
parent cbd4c46406
commit 59b3bc264c

View File

@ -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)) {