From baeb5e37a92eb9cbbf672389b2df5696aa75ea37 Mon Sep 17 00:00:00 2001 From: Dorian Eikenberg Date: Sun, 6 Jul 2014 19:44:19 +0200 Subject: [PATCH] Fix attach_wait and threads MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Dorian Eikenberg Acked-by: Serge E. Hallyn Acked-by: Stéphane Graber --- src/python-lxc/lxc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/python-lxc/lxc.c b/src/python-lxc/lxc.c index 1bc977a31..91c199f62 100644 --- a/src/python-lxc/lxc.c +++ b/src/python-lxc/lxc.c @@ -581,7 +581,9 @@ Container_attach_and_possibly_wait(Container *self, PyObject *args, goto out; if (wait) { + Py_BEGIN_ALLOW_THREADS ret = lxc_wait_for_pid_status(pid); + Py_END_ALLOW_THREADS /* handle case where attach fails */ if (WIFEXITED(ret) && WEXITSTATUS(ret) == 255) ret = -1; -- 2.47.2