plugins/mod_posix.lua

changeset 2332
7772dde4010b
parent 2074
c59c8f3ec645
child 2338
2a163f6a4bc2
--- a/plugins/mod_posix.lua	Mon Dec 07 18:32:50 2009 +0000
+++ b/plugins/mod_posix.lua	Mon Dec 07 18:38:35 2009 +0000
@@ -146,4 +146,11 @@
 		prosody.reload_config();
 		prosody.reopen_logfiles();
 	end);
+	
+	signal.signal("SIGINT", function ()
+		module:log("info", "Received SIGINT");
+		prosody.unlock_globals();
+		prosody.shutdown("Received SIGINT");
+		prosody.lock_globals();
+	end);
 end

mercurial