Skip to content
Snippets Groups Projects
Commit 151db8bb authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[A] Don't allow python to handle signals.

parent 6cf80f60
No related branches found
No related tags found
No related merge requests found
...@@ -50,7 +50,12 @@ pybind11::scoped_interpreter setupEmbeddedPython() ...@@ -50,7 +50,12 @@ pybind11::scoped_interpreter setupEmbeddedPython()
mark_used(&pybind11_init_impl_OpenGeoSys); mark_used(&pybind11_init_impl_OpenGeoSys);
#endif #endif
return pybind11::scoped_interpreter{}; // Allows ogs to be interrupted by SIGINT, which otherwise is handled by
// python. See
// https://docs.python.org/3/c-api/exceptions.html#c.PyErr_CheckSignals and
// https://pybind11.readthedocs.io/en/stable/faq.html#how-can-i-properly-handle-ctrl-c-in-long-running-functions
constexpr bool init_signal_handlers = false;
return pybind11::scoped_interpreter{init_signal_handlers};
} }
} // namespace ApplicationsLib } // namespace ApplicationsLib
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment