From fb1ccd59589a029342accfc6c648abdb9dc12acf Mon Sep 17 00:00:00 2001 From: Jay Kruer Date: Wed, 15 Jun 2022 18:03:38 -0700 Subject: [PATCH] Fix Windows compile(?) Flip back sigint_received after handling --- CLI/Repl.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CLI/Repl.cpp b/CLI/Repl.cpp index 7e0c059b..5818958d 100644 --- a/CLI/Repl.cpp +++ b/CLI/Repl.cpp @@ -47,10 +47,12 @@ enum class CompileFormat constexpr int MaxTraversalLimit = 50; // Ctrl-C handling +#ifndef _WIN32 volatile sig_atomic_t sigint_received = 0; static void handle_sig(int signum) { sigint_received = 1; } +#endif struct GlobalOptions { @@ -504,6 +506,7 @@ void ihandler(lua_State* L, int k) { // when VM_INTERRUPT sees that the status is non-zero it will // exit the interpreter loop lua_setstatus(L,LUA_SIGINT); + sigint_received = 0; } };