diff options
author | Kim Alvefur <zash@zash.se> | 2024-02-24 01:00:44 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2024-02-24 01:00:44 +0100 |
commit | 761643abcc02b20378d0e71ed6dbeef90d858e7e (patch) | |
tree | aca1179cc86b04d96d4e34757a7666030d1826fe /net | |
parent | 49c296360d8314cabf2aef48907488c109926ae3 (diff) | |
download | prosody-761643abcc02b20378d0e71ed6dbeef90d858e7e.tar.gz prosody-761643abcc02b20378d0e71ed6dbeef90d858e7e.zip |
util.signal: Wrap signalfd in an userdatum for gc handling etc
Diffstat (limited to 'net')
-rw-r--r-- | net/server_epoll.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua index a064dcfa..127d049e 100644 --- a/net/server_epoll.lua +++ b/net/server_epoll.lua @@ -1147,12 +1147,13 @@ end local hook_signal; if have_signal and signal.signalfd then local function dispatch(self) - return self:on("signal", signal.signalfd_read(self:getfd())); + return self:on("signal", self.conn:read()); end function hook_signal(signum, cb) local watch = watchfd(signal.signalfd(signum), dispatch); watch.listeners = { onsignal = cb }; + watch.close = nil; -- revert to default return watch; end end |