Comparison

plugins/mod_posix.lua @ 600:2255a2e84ddc

Automated merge with http://waqas.ath.cx:8000/
author Matthew Wild <mwild1@gmail.com>
date Sun, 07 Dec 2008 19:18:50 +0000
parent 594:6d9b2da9888f
child 722:63456c9d0522
comparison
equal deleted inserted replaced
599:30655c5cc531 600:2255a2e84ddc
33 log("error", "Failed to daemonize: %s", ret); 33 log("error", "Failed to daemonize: %s", ret);
34 elseif ret and ret > 0 then 34 elseif ret and ret > 0 then
35 log("info", "Daemonized to pid %d", ret); 35 log("info", "Daemonized to pid %d", ret);
36 os.exit(0); 36 os.exit(0);
37 else 37 else
38 log("info", "Successfully daemonized");
39
40 if logwriter then 38 if logwriter then
41 local ok, ret = logger_set(logwriter); 39 local ok, ret = logger_set(logwriter);
42 if not ok then 40 if not ok then
43 log("error", "Couldn't set new log output: %s", ret); 41 log("error", "Couldn't set new log output: %s", ret);
44 end 42 end
45 end 43 end
46 44 log("info", "Successfully daemonized");
47 end 45 end
48 end 46 end
49 module:add_event_hook("server-starting", daemonize_server); 47 module:add_event_hook("server-starting", daemonize_server);
50 end 48 end