aboutsummaryrefslogtreecommitdiff
path: root/lua.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-05-22 11:40:34 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-05-22 11:40:34 -0300
commit17dbaa8639505c9ad1a9946591f5960123fbd741 (patch)
treec078795bfb4a748ca05faabefafab4e35493714a /lua.c
parent9514abc2da3525ef4314a8fcf70982ad07319e51 (diff)
downloadlua-17dbaa8639505c9ad1a9946591f5960123fbd741.tar.gz
lua-17dbaa8639505c9ad1a9946591f5960123fbd741.tar.bz2
lua-17dbaa8639505c9ad1a9946591f5960123fbd741.zip
Improvements in the handling of signals
Added 'volatile' to 'l_signalT' variables plus some minor changes.
Diffstat (limited to 'lua.c')
-rw-r--r--lua.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lua.c b/lua.c
index 18f53c30..454ce12f 100644
--- a/lua.c
+++ b/lua.c
@@ -54,8 +54,9 @@ static void lstop (lua_State *L, lua_Debug *ar) {
54** interpreter. 54** interpreter.
55*/ 55*/
56static void laction (int i) { 56static void laction (int i) {
57 int flag = LUA_MASKCALL | LUA_MASKRET | LUA_MASKLINE | LUA_MASKCOUNT;
57 signal(i, SIG_DFL); /* if another SIGINT happens, terminate process */ 58 signal(i, SIG_DFL); /* if another SIGINT happens, terminate process */
58 lua_sethook(globalL, lstop, LUA_MASKCALL | LUA_MASKRET | LUA_MASKCOUNT, 1); 59 lua_sethook(globalL, lstop, flag, 1);
59} 60}
60 61
61 62