Merge pull request #2836 from YosysHQ/gatecat/pyosys-sigint

pyosys: Clear SIGINT handler after Python loads
This commit is contained in:
Miodrag Milanović 2021-06-18 12:07:50 +02:00 committed by GitHub
commit 5a73f296c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -71,6 +71,7 @@
#include <limits.h>
#include <errno.h>
#include <signal.h>
YOSYS_NAMESPACE_BEGIN
@ -540,6 +541,7 @@ void yosys_setup()
PyImport_AppendInittab((char*)"libyosys", INIT_MODULE);
Py_Initialize();
PyRun_SimpleString("import sys");
signal(SIGINT, SIG_DFL);
#endif
Pass::init_register();