From: Ruben Kerkhof Date: Thu, 24 Jan 2019 20:35:36 +0000 (+0100) Subject: Merge pull request #3042 from srivasta/upstream-fixes X-Git-Url: https://git.octo.it/?p=collectd.git;a=commitdiff_plain;h=22a3b2c0f100b48443eebde13667defd9c6f55d3;hp=471b37345751027b75366f28a17ef993fdae9b33 Merge pull request #3042 from srivasta/upstream-fixes [python-3.7-fix]: Allow compilation with Python 3.7 --- diff --git a/src/python.c b/src/python.c index 2c62146d..2f08bd34 100644 --- a/src/python.c +++ b/src/python.c @@ -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, "");