From 0dcc6dc478ae2bac41377f531ffc737dc3de78b0 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 30 Oct 2009 01:18:38 +0000 Subject: util.pposix: Add abort() function --- util-src/pposix.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'util-src') diff --git a/util-src/pposix.c b/util-src/pposix.c index 265245e0..94086ed6 100644 --- a/util-src/pposix.c +++ b/util-src/pposix.c @@ -463,12 +463,20 @@ int lc_getrlimit(lua_State *L) { 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"); -- cgit v1.2.3