summaryrefslogtreecommitdiffhomepage
path: root/libs/lucid/luasrc
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2009-05-26 17:44:27 +0000
committerSteven Barth <steven@midlink.org>2009-05-26 17:44:27 +0000
commit73eae62580d4f78ade009415ba6533f502f29e5e (patch)
treedcde6a5b74330a44176fdb7d7436488ebf3caba3 /libs/lucid/luasrc
parentf7deae100d6d36c1e8d6fef17316ca03aaf7214c (diff)
Fix redirector
Diffstat (limited to 'libs/lucid/luasrc')
-rw-r--r--libs/lucid/luasrc/lucid.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/libs/lucid/luasrc/lucid.lua b/libs/lucid/luasrc/lucid.lua
index 62741e79f..d72bf25ef 100644
--- a/libs/lucid/luasrc/lucid.lua
+++ b/libs/lucid/luasrc/lucid.lua
@@ -54,9 +54,20 @@ function start()
end
end
+ state:set(UCINAME, "main", "pid", nixio.getpid())
+ state:save(UCINAME)
+
run()
end
+function stop()
+ local pid = tonumber(state:get(UCINAME, "main", "pid"))
+ if pid then
+ return nixio.kill(pid, nixio.const.SIGTERM)
+ end
+ return false
+end
+
function prepare()
local debug = tonumber((cursor:get(UCINAME, "main", "debug")))