mod_posix: Fix to not loop in SIGTERM either, but the same happens with SIGHUP (where the same 'fix' can't be applied) - shall investigate tomorrow

Tue, 08 Dec 2009 01:24:16 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Tue, 08 Dec 2009 01:24:16 +0000
changeset 2342
8b20702d5b9e
parent 2341
27584901ddb5
child 2343
4b05fd561cbd

mod_posix: Fix to not loop in SIGTERM either, but the same happens with SIGHUP (where the same 'fix' can't be applied) - shall investigate tomorrow

plugins/mod_posix.lua file | annotate | diff | comparison | revisions
--- a/plugins/mod_posix.lua	Tue Dec 08 01:23:22 2009 +0000
+++ b/plugins/mod_posix.lua	Tue Dec 08 01:24:16 2009 +0000
@@ -136,6 +136,7 @@
 if signal.signal then
 	signal.signal("SIGTERM", function ()
 		module:log("warn", "Received SIGTERM");
+		signal.signal("SIGTERM", function () end); -- Fixes us getting into some kind of loop
 		prosody.unlock_globals();
 		prosody.shutdown("Received SIGTERM");
 		prosody.lock_globals();
@@ -149,7 +150,7 @@
 	
 	signal.signal("SIGINT", function ()
 		module:log("info", "Received SIGINT");
-		signal.signal("SIGINT", function () end); -- Fixes us getting into some kind of loop
+		signal.signal("SIGINT", function () end); -- Fix to not loop
 		prosody.unlock_globals();
 		prosody.shutdown("Received SIGINT");
 		prosody.lock_globals();

mercurial