# #
#############################################################################*/
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
#include <Python.h>
+#include <errno.h>
+#include <sched.h>
#include <sys/personality.h>
#include <unistd.h>
+#include "config.h"
#include "util.h"
PyObject *_personality(PyObject *self, PyObject *args) {
Py_RETURN_NONE;
}
+PyObject *_unshare(PyObject *self, PyObject *args) {
+ int flags = 0;
+
+ if (!PyArg_ParseTuple(args, "i", &flags)) {
+ return NULL;
+ }
+
+ int ret = unshare(flags);
+ if (ret < 0) {
+ return PyErr_SetFromErrno(PyExc_RuntimeError);
+ }
+
+ return Py_BuildValue("i", ret);
+}
+
PyObject *version_compare(PyObject *self, PyObject *args) {
Pool *pool;
const char *evr1, *evr2;