diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-07-02 15:22:38 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-07-02 15:22:38 -0300 |
commit | 3b4c831ca9e7d04a1e62eee2016b7c001715fbfc (patch) | |
tree | dba68dbd67e4e3ed59a43b28b5da7b7842c24282 | |
parent | 3fdab3981b92f9f76beef9c22ef55f9d537fdfd4 (diff) | |
download | lua-3b4c831ca9e7d04a1e62eee2016b7c001715fbfc.tar.gz lua-3b4c831ca9e7d04a1e62eee2016b7c001715fbfc.tar.bz2 lua-3b4c831ca9e7d04a1e62eee2016b7c001715fbfc.zip |
some systems do not reset signal handlers when a signal happens
-rw-r--r-- | lua.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lua.c,v 1.19 1999/02/04 17:47:59 roberto Exp roberto $ | 2 | ** $Id: lua.c,v 1.20 1999/06/24 19:42:02 roberto Exp roberto $ |
3 | ** Lua stand-alone interpreter | 3 | ** Lua stand-alone interpreter |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -45,6 +45,8 @@ static void lstop (void) { | |||
45 | 45 | ||
46 | 46 | ||
47 | static void laction (int i) { | 47 | static void laction (int i) { |
48 | signal(SIGINT, SIG_DFL); /* if another SIGINT happens before lstop, | ||
49 | terminate process (default action) */ | ||
48 | old_linehook = lua_setlinehook((lua_LHFunction)lstop); | 50 | old_linehook = lua_setlinehook((lua_LHFunction)lstop); |
49 | old_callhook = lua_setcallhook((lua_CHFunction)lstop); | 51 | old_callhook = lua_setcallhook((lua_CHFunction)lstop); |
50 | } | 52 | } |