Software /
code /
prosody
Comparison
plugins/mod_posix.lua @ 1119:61a011ebe243
Merge with 0.4
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 05 May 2009 14:20:26 +0100 |
parent | 1100:05d209ef9661 |
parent | 1118:239d4362a040 |
child | 1238:f4c08caca3e7 |
comparison
equal
deleted
inserted
replaced
1112:e8a00a2ea910 | 1119:61a011ebe243 |
---|---|
84 write_pidfile(); | 84 write_pidfile(); |
85 end | 85 end |
86 | 86 |
87 module:add_event_hook("server-stopped", remove_pidfile); | 87 module:add_event_hook("server-stopped", remove_pidfile); |
88 | 88 |
89 -- Set signal handler | 89 -- Set signal handlers |
90 if signal.signal then | 90 if signal.signal then |
91 signal.signal("SIGTERM", function () | 91 signal.signal("SIGTERM", function () |
92 module:log("warn", "Received SIGTERM..."); | 92 module:log("warn", "Received SIGTERM"); |
93 _G.unlock_globals(); | 93 _G.unlock_globals(); |
94 if _G.prosody_shutdown then | 94 _G.prosody_shutdown("Received SIGTERM"); |
95 _G.prosody_shutdown("Received SIGTERM"); | |
96 else | |
97 module:log("warn", "...no prosody_shutdown(), ignoring."); | |
98 end | |
99 _G.lock_globals(); | 95 _G.lock_globals(); |
100 end); | 96 end); |
97 | |
98 signal.signal("SIGHUP", function () | |
99 module:log("info", "Received SIGHUP"); | |
100 _G.prosody_reload_config(); | |
101 _G.prosody_reopen_logfiles(); | |
102 end); | |
101 end | 103 end |