From: Dorian Eikenberg Date: Sun, 6 Jul 2014 17:44:19 +0000 (+0200) Subject: Fix attach_wait and threads X-Git-Tag: lxc-1.1.0.alpha1~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=baeb5e37a92eb9cbbf672389b2df5696aa75ea37;p=thirdparty%2Flxc.git Fix attach_wait and threads Signed-off-by: Dorian Eikenberg Acked-by: Serge E. Hallyn Acked-by: Stéphane Graber --- 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;