163 |
163 |
164 static struct signal_event *last_event = NULL; |
164 static struct signal_event *last_event = NULL; |
165 |
165 |
166 static void sighook(lua_State *L, lua_Debug *ar) |
166 static void sighook(lua_State *L, lua_Debug *ar) |
167 { |
167 { |
|
168 /* restore the old hook */ |
|
169 lua_sethook(L, Hsig, Hmask, Hcount); |
|
170 |
168 lua_pushstring(L, LUA_SIGNAL); |
171 lua_pushstring(L, LUA_SIGNAL); |
169 lua_gettable(L, LUA_REGISTRYINDEX); |
172 lua_gettable(L, LUA_REGISTRYINDEX); |
170 |
173 |
171 struct signal_event *event; |
174 struct signal_event *event; |
172 while((event = signal_queue)) |
175 while((event = signal_queue)) |