Improvements in the handling of signals
Added 'volatile' to 'l_signalT' variables plus some minor changes.
This commit is contained in:
3
lua.c
3
lua.c
@@ -54,8 +54,9 @@ static void lstop (lua_State *L, lua_Debug *ar) {
|
||||
** interpreter.
|
||||
*/
|
||||
static void laction (int i) {
|
||||
int flag = LUA_MASKCALL | LUA_MASKRET | LUA_MASKLINE | LUA_MASKCOUNT;
|
||||
signal(i, SIG_DFL); /* if another SIGINT happens, terminate process */
|
||||
lua_sethook(globalL, lstop, LUA_MASKCALL | LUA_MASKRET | LUA_MASKCOUNT, 1);
|
||||
lua_sethook(globalL, lstop, flag, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user