Software /
code /
prosody-modules
Diff
mod_debug_traceback/mod_debug_traceback.lua @ 5874: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 |
parent | 4222:02292b892fce |
line wrap: on
line diff
--- 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);