461 lua_pushnumber(L, lim.rlim_cur); |
461 lua_pushnumber(L, lim.rlim_cur); |
462 lua_pushnumber(L, lim.rlim_max); |
462 lua_pushnumber(L, lim.rlim_max); |
463 return 3; |
463 return 3; |
464 } |
464 } |
465 |
465 |
|
466 void lc_abort(lua_State* L) |
|
467 { |
|
468 abort(); |
|
469 } |
|
470 |
466 /* Register functions */ |
471 /* Register functions */ |
467 |
472 |
468 int luaopen_util_pposix(lua_State *L) |
473 int luaopen_util_pposix(lua_State *L) |
469 { |
474 { |
470 lua_newtable(L); |
475 lua_newtable(L); |
|
476 |
|
477 lua_pushcfunction(L, lc_abort); |
|
478 lua_setfield(L, -2, "abort"); |
471 |
479 |
472 lua_pushcfunction(L, lc_daemonize); |
480 lua_pushcfunction(L, lc_daemonize); |
473 lua_setfield(L, -2, "daemonize"); |
481 lua_setfield(L, -2, "daemonize"); |
474 |
482 |
475 lua_pushcfunction(L, lc_syslog_open); |
483 lua_pushcfunction(L, lc_syslog_open); |