diff --git a/src/main.cpp b/src/main.cpp index 73cd79c..c340970 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -65,6 +65,8 @@ static void ctrlc_handler(int sig, siginfo_t* siginfo, void* context) static void segv_handler(int sig, siginfo_t* siginfo, void* context) { fprintf(stderr, "Internal error\n"); + s_prog_to_interrupt->stop(); + s_prog_to_interrupt = NULL; } static void catch_signals(program* prog)