changeset 5850:0358fcf14cd6

mod_debug_traceback: Remove direct POSIX signal handling, require Prosody 0.12+ Hooking an event is safer than directly hooking signals For context see Prosody trunk rev 69faf3552d52
author Kim Alvefur <zash@zash.se>
date Sat, 02 Mar 2024 14:42:27 +0100 (9 months ago)
parents 84a784bc4096
children dde9d21a599f
files mod_debug_traceback/README.markdown mod_debug_traceback/mod_debug_traceback.lua
diffstat 2 files changed, 2 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/mod_debug_traceback/README.markdown	Thu Feb 29 18:05:09 2024 +0100
+++ b/mod_debug_traceback/README.markdown	Sat Mar 02 14:42:27 2024 +0100
@@ -22,4 +22,4 @@
 
 # Compatibility
 
-Prosody 0.11 or later.
+Prosody 0.12 or later.
--- a/mod_debug_traceback/mod_debug_traceback.lua	Thu Feb 29 18:05:09 2024 +0100
+++ b/mod_debug_traceback/mod_debug_traceback.lua	Sat Mar 02 14:42:27 2024 +0100
@@ -46,9 +46,4 @@
 	count = count + 1;
 end
 
-local mod_posix = module:depends("posix");
-if rawget(mod_posix, "features") and mod_posix.features.signal_events then
-	module:hook("signal/"..signal_name, dump_traceback);
-else
-	require"util.signal".signal(signal_name, dump_traceback);
-end
+module:hook("signal/"..signal_name, dump_traceback);