diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-05-22 11:40:34 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-05-22 11:40:34 -0300 |
| commit | 17dbaa8639505c9ad1a9946591f5960123fbd741 (patch) | |
| tree | c078795bfb4a748ca05faabefafab4e35493714a /lua.c | |
| parent | 9514abc2da3525ef4314a8fcf70982ad07319e51 (diff) | |
| download | lua-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.c | 3 |
1 files changed, 2 insertions, 1 deletions
| @@ -54,8 +54,9 @@ static void lstop (lua_State *L, lua_Debug *ar) { | |||
| 54 | ** interpreter. | 54 | ** interpreter. |
| 55 | */ | 55 | */ |
| 56 | static void laction (int i) { | 56 | static 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 | ||
