# HG changeset patch # User Matthew Wild # Date 1263095669 0 # Node ID 1e045b3e9dceb5af7509c1637b821f3957e5538c # Parent c4d32b35fe60a7f9d8f1d8e63346daa0feb0484f util.signal: Restore the old debug hook earlier, just in case we receive another signal between clearing the signal queue and restoring it diff -r c4d32b35fe60 -r 1e045b3e9dce util-src/signal.c --- a/util-src/signal.c Sun Jan 10 00:31:38 2010 +0000 +++ b/util-src/signal.c Sun Jan 10 03:54:29 2010 +0000 @@ -165,6 +165,9 @@ static void sighook(lua_State *L, lua_Debug *ar) { + /* restore the old hook */ + lua_sethook(L, Hsig, Hmask, Hcount); + lua_pushstring(L, LUA_SIGNAL); lua_gettable(L, LUA_REGISTRYINDEX); @@ -180,8 +183,6 @@ lua_pop(L, 1); /* pop lua_signal table */ - /* restore the old hook */ - lua_sethook(L, Hsig, Hmask, Hcount); } static void handle(int sig)