Comparison

plugins/mod_posix.lua @ 2338:2a163f6a4bc2

mod_posix: Set empty SIGINT handler when a SIGINT is caught
author Matthew Wild <mwild1@gmail.com>
date Tue, 08 Dec 2009 01:16:24 +0000
parent 2332:7772dde4010b
child 2342:8b20702d5b9e
comparison
equal deleted inserted replaced
2337:9eb20b3f3bbb 2338:2a163f6a4bc2
147 prosody.reopen_logfiles(); 147 prosody.reopen_logfiles();
148 end); 148 end);
149 149
150 signal.signal("SIGINT", function () 150 signal.signal("SIGINT", function ()
151 module:log("info", "Received SIGINT"); 151 module:log("info", "Received SIGINT");
152 signal.signal("SIGINT", function () end); -- Fixes us getting into some kind of loop
152 prosody.unlock_globals(); 153 prosody.unlock_globals();
153 prosody.shutdown("Received SIGINT"); 154 prosody.shutdown("Received SIGINT");
154 prosody.lock_globals(); 155 prosody.lock_globals();
155 end); 156 end);
156 end 157 end