Software /
code /
prosody
Comparison
util-src/pposix.c @ 2060:b23295b5428a
util.pposix: Add abort() function
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 30 Oct 2009 01:18:38 +0000 (2009-10-30) |
parent | 1842:8337c0d4aee4 |
child | 2436:ccc71b5d2e01 |
child | 2830:1df57426263a |
comparison
equal
deleted
inserted
replaced
2059:d4fb80b60c65 | 2060:b23295b5428a |
---|---|
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); |