projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
44c261f
)
mod_posix: Catch SIGINT
author
Matthew Wild
<mwild1@gmail.com>
Mon, 7 Dec 2009 18:38:35 +0000
(18:38 +0000)
committer
Matthew Wild
<mwild1@gmail.com>
Mon, 7 Dec 2009 18:38:35 +0000
(18:38 +0000)
plugins/mod_posix.lua
patch
|
blob
|
history
diff --git
a/plugins/mod_posix.lua
b/plugins/mod_posix.lua
index b75b9610a887d9a5118ae77fdf8f39739147d3cc..697930cab39266e11bc9f0cb5ae07399ad09822a 100644
(file)
--- 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