diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-12-07 18:38:35 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-12-07 18:38:35 +0000 |
commit | 97680a1c215edb26bcd554fb3f86dc182f64c3fc (patch) | |
tree | 8fa43ab2bfea86bb6bba781d105a227803af4e31 /plugins | |
parent | ef4507bea32fa314c48fcb20774deab8d16b1d39 (diff) | |
download | prosody-97680a1c215edb26bcd554fb3f86dc182f64c3fc.tar.gz prosody-97680a1c215edb26bcd554fb3f86dc182f64c3fc.zip |
mod_posix: Catch SIGINT
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_posix.lua | 7 |
1 files changed, 7 insertions, 0 deletions
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 |