Merge pull request #3042 from srivasta/upstream-fixes
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Thu, 24 Jan 2019 20:35:36 +0000 (21:35 +0100)
committerGitHub <noreply@github.com>
Thu, 24 Jan 2019 20:35:36 +0000 (21:35 +0100)
[python-3.7-fix]: Allow compilation with Python 3.7

src/python.c

index 2c62146..2f08bd3 100644 (file)
@@ -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, "<stdin>");