Commit 0fbd2f6a by Aleksandr Mezin

python-lxc: don't use private lxc/utils.h

parent d51f78ed
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include <Python.h> #include <Python.h>
#include "structmember.h" #include "structmember.h"
#include <lxc/lxccontainer.h> #include <lxc/lxccontainer.h>
#include "lxc/utils.h"
#include "lxc/confile.h" #include "lxc/confile.h"
#include <stdio.h> #include <stdio.h>
#include <sys/wait.h> #include <sys/wait.h>
...@@ -61,6 +60,23 @@ ...@@ -61,6 +60,23 @@
/* Helper functions */ /* Helper functions */
/* Copied from lxc/utils.c */
static int lxc_wait_for_pid_status(pid_t pid)
{
int status, ret;
again:
ret = waitpid(pid, &status, 0);
if (ret == -1) {
if (errno == EINTR)
goto again;
return -1;
}
if (ret != pid)
goto again;
return status;
}
char** char**
convert_tuple_to_char_pointer_array(PyObject *argv) { convert_tuple_to_char_pointer_array(PyObject *argv) {
int argc; int argc;
......
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