moonbridge

diff moonbridge_io.c @ 270:fab22173abc8

Added signal constants table moonbridge_io.signals
author jbe
date Sun Jun 04 19:53:34 2017 +0200 (2017-06-04)
parents 48ffca6443d9
children 30629973dcff
line diff
     1.1 --- a/moonbridge_io.c	Sun Jun 04 19:23:31 2017 +0200
     1.2 +++ b/moonbridge_io.c	Sun Jun 04 19:53:34 2017 +0200
     1.3 @@ -2079,6 +2079,22 @@
     1.4    lua_setfield(L, -2, "stdout");
     1.5    moonbr_io_pushhandle(L, 2);
     1.6    lua_setfield(L, -2, "stderr");
     1.7 +
     1.8 +  lua_newtable(L);  // signal numbers
     1.9 +  lua_pushinteger(L, SIGHUP);  lua_setfield(L, -2, "HUP");
    1.10 +  lua_pushinteger(L, SIGINT);  lua_setfield(L, -2, "INT");
    1.11 +  lua_pushinteger(L, SIGQUIT); lua_setfield(L, -2, "QUIT");
    1.12 +  lua_pushinteger(L, SIGABRT); lua_setfield(L, -2, "ABRT");
    1.13 +  lua_pushinteger(L, SIGPIPE); lua_setfield(L, -2, "PIPE");
    1.14 +  lua_pushinteger(L, SIGALRM); lua_setfield(L, -2, "ALRM");
    1.15 +  lua_pushinteger(L, SIGTERM); lua_setfield(L, -2, "TERM");
    1.16 +  lua_pushinteger(L, SIGTSTP); lua_setfield(L, -2, "TSTP");
    1.17 +  lua_pushinteger(L, SIGCONT); lua_setfield(L, -2, "CONT");
    1.18 +  lua_pushinteger(L, SIGVTALRM); lua_setfield(L, -2, "VTALRM");
    1.19 +  lua_pushinteger(L, SIGINFO); lua_setfield(L, -2, "INFO");
    1.20 +  lua_pushinteger(L, SIGUSR1); lua_setfield(L, -2, "USR1");
    1.21 +  lua_pushinteger(L, SIGUSR2); lua_setfield(L, -2, "USR2");
    1.22 +  lua_setfield(L, -2, "signals");
    1.23    
    1.24    luaL_setfuncs(L, moonbr_io_module_funcs, 0);
    1.25    return 1;

Impressum / About Us