# HG changeset patch # User Matthew Wild # Date 1260211115 0 # Node ID 7772dde4010be19316e9cbe2387db69000cd9c68 # Parent 4842ce0c3be42de2da20afc176157221c3eb4c45 mod_posix: Catch SIGINT diff -r 4842ce0c3be4 -r 7772dde4010b plugins/mod_posix.lua --- 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