** Function to be called at a C signal. Because a C signal cannot ** just change a Lua state (as there is no proper synchronization), ** this function only sets a hook that, when called, will stop the ** interpreter. */
| 74 | ** interpreter. |
| 75 | */ |
| 76 | static void laction (int i) { |
| 77 | int flag = LUA_MASKCALL | LUA_MASKRET | LUA_MASKLINE | LUA_MASKCOUNT; |
| 78 | setsignal(i, SIG_DFL); /* if another SIGINT happens, terminate process */ |
| 79 | lua_sethook(globalL, lstop, flag, 1); |
| 80 | } |
| 81 | |
| 82 | |
| 83 | static void print_usage (const char *badoption) { |
nothing calls this directly
no test coverage detected