X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fpython.c;h=9d47d701ce1e5154c6d65b7b55dee4b854412507;hb=6378ec288f34ff250b2971a1452338a2b34c240a;hp=2c62146deb4a9c765d4a3adf3bc4c0d39679c263;hpb=a96e1c4a5e2c0244607b9da71175c2a12a4451fd;p=collectd.git diff --git a/src/python.c b/src/python.c index 2c62146d..9d47d701 100644 --- a/src/python.c +++ b/src/python.c @@ -31,7 +31,7 @@ #include "collectd.h" -#include "common.h" +#include "utils/common/common.h" #include "cpython.h" @@ -1133,7 +1133,11 @@ static void *cpy_interactive(void *pipefd) { cpy_log_exception("interactive session init"); } cur_sig = PyOS_setsig(SIGINT, python_sigint_handler); +#if PY_VERSION_HEX < 0x03070000 PyOS_AfterFork(); +#else + PyOS_AfterFork_Child(); +#endif PyEval_InitThreads(); close(*(int *)pipefd); PyRun_InteractiveLoop(stdin, "");