Commit 59b3bc26 by Stéphane Graber

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.
parent cbd4c464
...@@ -59,14 +59,6 @@ convert_tuple_to_char_pointer_array(PyObject *argv) { ...@@ -59,14 +59,6 @@ convert_tuple_to_char_pointer_array(PyObject *argv) {
return result; return result;
} }
void zombie_handler(int sig)
{
signal(SIGCHLD,zombie_handler);
int status;
waitpid(-1, &status, WNOHANG);
}
static void static void
Container_dealloc(Container* self) Container_dealloc(Container* self)
{ {
...@@ -353,7 +345,6 @@ Container_start(Container *self, PyObject *args, PyObject *kwds) ...@@ -353,7 +345,6 @@ Container_start(Container *self, PyObject *args, PyObject *kwds)
} }
} }
signal(SIGCHLD, zombie_handler);
self->container->want_daemonize(self->container); self->container->want_daemonize(self->container);
if (self->container->start(self->container, init_useinit, init_args)) { if (self->container->start(self->container, init_useinit, init_args)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment