]> sigrok.org Git - libsigrokdecode.git/commitdiff
init: Don't let Python override signal handlers
authorMarcus Comstedt <redacted>
Fri, 4 Dec 2015 21:36:17 +0000 (22:36 +0100)
committerUwe Hermann <redacted>
Mon, 7 Dec 2015 16:03:37 +0000 (17:03 +0100)
This fixes bug #461.

srd.c

diff --git a/srd.c b/srd.c
index 7b18c9a4dfa2a6ded230005f452a611f0094c4bb..2947ca8dd14bcda6073b41c4ee7e0c0a2d86f297 100644 (file)
--- a/srd.c
+++ b/srd.c
@@ -157,7 +157,7 @@ SRD_API int srd_init(const char *path)
        PyImport_AppendInittab("sigrokdecode", PyInit_sigrokdecode);
 
        /* Initialize the Python interpreter. */
-       Py_Initialize();
+       Py_InitializeEx(0);
 
        /* Locations relative to the XDG system data directories. */
        sys_datadirs = g_get_system_data_dirs();