From c902827035d4d596bc0161ebc66b9a27ed94482b Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Mon, 2 Oct 2017 14:12:43 -0400 Subject: [PATCH] Port: no sighandlers on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- python-plugin-provider/python-plugin-provider.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python-plugin-provider/python-plugin-provider.c b/python-plugin-provider/python-plugin-provider.c index 2404fc7a..9044d8a2 100644 --- a/python-plugin-provider/python-plugin-provider.c +++ b/python-plugin-provider/python-plugin-provider.c @@ -81,7 +81,9 @@ void init_python(void) { PyObject *py_bt2_py_plugin_mod = NULL; const char *dis_python_env; +#ifndef __MINGW32__ sighandler_t old_sigint = signal(SIGINT, SIG_DFL); +#endif if (python_state != PYTHON_STATE_NOT_INITED) { goto end; @@ -128,9 +130,11 @@ void init_python(void) python_state = PYTHON_STATE_FULLY_INITIALIZED; end: +#ifndef __MINGW32__ if (old_sigint != SIG_ERR) { (void) signal(SIGINT, old_sigint); } +#endif print_python_traceback_warn(); pyerr_clear(); -- 2.34.1