]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Fix attach_wait and threads
authorDorian Eikenberg <Dorian.Eikenberg@uni-duesseldorf.de>
Sun, 6 Jul 2014 17:44:19 +0000 (19:44 +0200)
committerStéphane Graber <stgraber@ubuntu.com>
Mon, 7 Jul 2014 14:16:01 +0000 (10:16 -0400)
Signed-off-by: Dorian Eikenberg <dorian.eikenberg@uni-duesseldorf.de>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/python-lxc/lxc.c

index 1bc977a310c5def0073dec0b241e4b7c55d684ce..91c199f62b79b9916519af9c796b29bd921eb285 100644 (file)
@@ -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;