Software /
code /
prosody
Diff
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 |
parent | 1842:8337c0d4aee4 |
child | 2436:ccc71b5d2e01 |
child | 2830:1df57426263a |
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");