Comparison

plugins/mod_posix.lua @ 5177:add9ad38208e

mod_posix: Log a message explaining that we are detaching from the console
author Kim Alvefur <zash@zash.se>
date Sun, 11 Nov 2012 23:44:56 +0100
parent 5175:fabaed7418a6
child 5450:cc83b1a50fde
comparison
equal deleted inserted replaced
5176:7d0a8b255a37 5177:add9ad38208e
143 lm.reload_logging(); 143 lm.reload_logging();
144 end 144 end
145 145
146 if daemonize then 146 if daemonize then
147 local function daemonize_server() 147 local function daemonize_server()
148 module:log("info", "Prosody is about to detach from the console, disabling further console output");
148 remove_log_sinks(); 149 remove_log_sinks();
149 local ok, ret = pposix.daemonize(); 150 local ok, ret = pposix.daemonize();
150 if not ok then 151 if not ok then
151 module:log("error", "Failed to daemonize: %s", ret); 152 module:log("error", "Failed to daemonize: %s", ret);
152 elseif ret and ret > 0 then 153 elseif ret and ret > 0 then