diff --git a/src/pydefix.cpp b/src/pydefix.cpp index 1b816808..f7044af7 100644 --- a/src/pydefix.cpp +++ b/src/pydefix.cpp @@ -13,6 +13,7 @@ #include // For STL vectors and containers #include #include +#include #include "idefix.hpp" #include "dataBlock.hpp" #include "dataBlockHost.hpp" @@ -278,6 +279,7 @@ Pydefix::Pydefix(Input &input) { idfx::cout << "Pydefix: start Python interpreter." << std::endl; py::initialize_interpreter(); + std::signal(SIGINT, SIG_DFL); // restore "terminate on Ctrl-C" signal handler py::exec("import sys; print(f'Pydefix: Python Version: {sys.version}')"); py::exec("print(f'Pydefix: Executable Path: {sys.executable}')"); py::exec("print(f'Pydefix: Sys Path: {sys.path}')");