Changeset 2541


Ignore:
Timestamp:
Mar 2, 2013, 4:33:06 PM (10 years ago)
Author:
sam
Message:

lua: disable Lua signal handling: PS3, X360 or NaCl don't have signal().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lua/lua.c

    r2540 r2541  
    66
    77
     8#if 0 // LOL BEGIN
    89#include <signal.h>
     10#endif // LOL END
    911#include <stdio.h>
    1012#include <stdlib.h>
     
    8688
    8789
     90#if 0 // LOL BEGIN
    8891static lua_State *globalL = NULL;
     92#endif // LOL END
    8993
    9094static const char *progname = LUA_PROGNAME;
     
    99103
    100104
     105#if 0 // LOL BEGIN
    101106static void laction (int i) {
    102107  signal(i, SIG_DFL); /* if another SIGINT happens before lstop,
     
    104109  lua_sethook(globalL, lstop, LUA_MASKCALL | LUA_MASKRET | LUA_MASKCOUNT, 1);
    105110}
     111#endif // LOL END
    106112
    107113
     
    175181  lua_pushcfunction(L, traceback);  /* push traceback function */
    176182  lua_insert(L, base);  /* put it under chunk and args */
     183#if 0 // LOL BEGIN
    177184  globalL = L;  /* to be available to 'laction' */
    178185  signal(SIGINT, laction);
     186#endif // LOL END
    179187  status = lua_pcall(L, narg, nres, base);
     188#if 0 // LOL BEGIN
    180189  signal(SIGINT, SIG_DFL);
     190#endif // LOL END
    181191  lua_remove(L, base);  /* remove traceback function */
    182192  return status;
Note: See TracChangeset for help on using the changeset viewer.