From e07ee5a4f644a03ba52f9be74c7b9d3486acf5d5 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Tue, 8 Dec 2009 01:24:16 +0000 Subject: [PATCH] mod_posix: Fix to not loop in SIGTERM either, but the same happens with SIGHUP (where the same 'fix' can't be applied) - shall investigate tomorrow --- plugins/mod_posix.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/mod_posix.lua b/plugins/mod_posix.lua index 4b1cf84f..95b95034 100644 --- a/plugins/mod_posix.lua +++ b/plugins/mod_posix.lua @@ -136,6 +136,7 @@ module:add_event_hook("server-stopped", remove_pidfile); if signal.signal then signal.signal("SIGTERM", function () module:log("warn", "Received SIGTERM"); + signal.signal("SIGTERM", function () end); -- Fixes us getting into some kind of loop prosody.unlock_globals(); prosody.shutdown("Received SIGTERM"); prosody.lock_globals(); @@ -149,7 +150,7 @@ if signal.signal then signal.signal("SIGINT", function () module:log("info", "Received SIGINT"); - signal.signal("SIGINT", function () end); -- Fixes us getting into some kind of loop + signal.signal("SIGINT", function () end); -- Fix to not loop prosody.unlock_globals(); prosody.shutdown("Received SIGINT"); prosody.lock_globals(); -- 2.30.2