From 97680a1c215edb26bcd554fb3f86dc182f64c3fc Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Mon, 7 Dec 2009 18:38:35 +0000 Subject: mod_posix: Catch SIGINT --- plugins/mod_posix.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/mod_posix.lua b/plugins/mod_posix.lua index b75b9610..697930ca 100644 --- a/plugins/mod_posix.lua +++ b/plugins/mod_posix.lua @@ -146,4 +146,11 @@ if signal.signal then 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 -- cgit v1.2.3