MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / laction

Function laction

lib/lua/src/lua.c:76–80  ·  view source on GitHub ↗

** 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. */

Source from the content-addressed store, hash-verified

74** interpreter.
75*/
76static 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
83static void print_usage (const char *badoption) {

Callers

nothing calls this directly

Calls 2

setsignalFunction · 0.85
lua_sethookFunction · 0.85

Tested by

no test coverage detected