Software /
code /
prosody
Changeset
2060:b23295b5428a
util.pposix: Add abort() function
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 30 Oct 2009 01:18:38 +0000 |
parents | 2059:d4fb80b60c65 |
children | 2061:e34fdca432a9 |
files | util-src/pposix.c |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/util-src/pposix.c Mon Oct 26 23:35:48 2009 +0000 +++ b/util-src/pposix.c Fri Oct 30 01:18:38 2009 +0000 @@ -463,12 +463,20 @@ return 3; } +void lc_abort(lua_State* L) +{ + abort(); +} + /* Register functions */ int luaopen_util_pposix(lua_State *L) { lua_newtable(L); + lua_pushcfunction(L, lc_abort); + lua_setfield(L, -2, "abort"); + lua_pushcfunction(L, lc_daemonize); lua_setfield(L, -2, "daemonize");