Commit 1dd9a6c0 by Stéphane Graber

Merge pull request #739 from shindo/fix/python-lxc/pyos-afterfork

python-lxc: Call PyOS_AfterFork after attaching to a container
parents a36a3c0d 4027875d
......@@ -117,6 +117,12 @@ struct lxc_attach_python_payload {
static int lxc_attach_python_exec(void* _payload)
{
/* This function is the first one to be called after attaching to a
* container. As lxc_attach() calls fork() PyOS_AfterFork should be called
* in the new process if the Python interpreter will continue to be used.
*/
PyOS_AfterFork();
struct lxc_attach_python_payload *payload =
(struct lxc_attach_python_payload *)_payload;
PyObject *result = PyObject_CallFunctionObjArgs(payload->fn,
......
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