diff options
author | Alexey Zaytsev <alexey.zaytsev@gmail.com> | 2008-07-18 02:25:42 +0400 |
---|---|---|
committer | Alexey Zaytsev <zaytsev.a@protei.ru> | 2008-07-18 02:25:42 +0400 |
commit | 4fb927db20448bf1902f24f98de96519b24f7f58 (patch) | |
tree | 99b43bd3b2db8cc96d953ae125e3bdb7767acb0f | |
parent | b6382e3eae47fa318c07b6230201ca7d86de4f65 (diff) | |
download | syslinux-4fb927db20448bf1902f24f98de96519b24f7f58.tar.gz syslinux-4fb927db20448bf1902f24f98de96519b24f7f58.tar.xz syslinux-4fb927db20448bf1902f24f98de96519b24f7f58.zip |
Remove the signal.h dependency from lua.c
Signed-off-by: Alexey Zaytsev <zaytsev.a@protei.ru>
-rw-r--r-- | com32/lua/src/lua.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/com32/lua/src/lua.c b/com32/lua/src/lua.c index 3a466093..7df2c3f7 100644 --- a/com32/lua/src/lua.c +++ b/com32/lua/src/lua.c @@ -5,7 +5,7 @@ */ -#include <signal.h> +//#include <signal.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -24,6 +24,7 @@ static lua_State *globalL = NULL; static const char *progname = LUA_PROGNAME; +#if 0 static void lstop (lua_State *L, lua_Debug *ar) { (void)ar; /* unused arg. */ @@ -31,13 +32,12 @@ static void lstop (lua_State *L, lua_Debug *ar) { luaL_error(L, "interrupted!"); } - static void laction (int i) { signal(i, SIG_DFL); /* if another SIGINT happens before lstop, terminate process (default action) */ lua_sethook(globalL, lstop, LUA_MASKCALL | LUA_MASKRET | LUA_MASKCOUNT, 1); } - +#endif static void print_usage (void) { fprintf(stderr, @@ -98,9 +98,9 @@ static int docall (lua_State *L, int narg, int clear) { int base = lua_gettop(L) - narg; /* function index */ lua_pushcfunction(L, traceback); /* push traceback function */ lua_insert(L, base); /* put it under chunk and args */ - signal(SIGINT, laction); + /* signal(SIGINT, laction);*/ status = lua_pcall(L, narg, (clear ? 0 : LUA_MULTRET), base); - signal(SIGINT, SIG_DFL); +/* signal(SIGINT, SIG_DFL);*/ lua_remove(L, base); /* remove traceback function */ /* force a complete garbage collection in case of errors */ if (status != 0) lua_gc(L, LUA_GCCOLLECT, 0); |