aboutsummaryrefslogtreecommitdiffstats
path: root/common/pybindings.cc
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-06-14 10:08:54 +0200
committerDavid Shah <davey1576@gmail.com>2018-06-14 10:08:54 +0200
commitb1cbae1293fecf3ba14a7ce073d26dcfb07177f0 (patch)
treeb27c87346e0642db81859f894a991b74bb3c8b2b /common/pybindings.cc
parentc94b8c4861cfd8233bce4ee4f56c9e1c93e42ecb (diff)
downloadnextpnr-b1cbae1293fecf3ba14a7ce073d26dcfb07177f0.tar.gz
nextpnr-b1cbae1293fecf3ba14a7ce073d26dcfb07177f0.tar.bz2
nextpnr-b1cbae1293fecf3ba14a7ce073d26dcfb07177f0.zip
python: Clear SIGINT handler after Python loads
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'common/pybindings.cc')
-rw-r--r--common/pybindings.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/pybindings.cc b/common/pybindings.cc
index 761d6571..10bbab7b 100644
--- a/common/pybindings.cc
+++ b/common/pybindings.cc
@@ -24,6 +24,7 @@
#include "nextpnr.h"
#include <fstream>
+#include <signal.h>
NEXTPNR_NAMESPACE_BEGIN
@@ -157,6 +158,7 @@ void init_python(const char *executable)
std::string perror_str = parse_python_exception();
std::cout << "Error in Python: " << perror_str << std::endl;
}
+ signal(SIGINT, SIG_DFL);
#endif
}