File

util/xpcall.lua @ 13448:93b4ce0115f0

util.signal: Fail signalfd() if unable to change signal mask By aborting early, the failure should be brought to the attention somehow.
author Kim Alvefur <zash@zash.se>
date Wed, 28 Feb 2024 22:31:06 +0100
parent 12975:d10957394a3c
line wrap: on
line source

local xpcall = xpcall;

if select(2, xpcall(function (x) return x end, function () end,  "test")) ~= "test" then
	xpcall = require"prosody.util.compat".xpcall;
end

return {
	xpcall = xpcall;
};