aboutsummaryrefslogtreecommitdiffstats
path: root/util-src
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-10-12 03:22:09 +0200
committerKim Alvefur <zash@zash.se>2018-10-12 03:22:09 +0200
commit2bb3772374c54fbf8305763449e30185d4a6807d (patch)
tree8025d448365b2e79271bf088c41bb0afe8720b0d /util-src
parentnet.server_epoll: Ignore ENOENT when deregitering socket (diff)
downloadprosody-2bb3772374c54fbf8305763449e30185d4a6807d.tar.xz
prosody-2bb3772374c54fbf8305763449e30185d4a6807d.zip
net.server_epoll: Special handling of signal interrupts
Diffstat (limited to 'util-src')
-rw-r--r--util-src/poll.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/util-src/poll.c b/util-src/poll.c
index e5b5f70c6..0ca0cf288 100644
--- a/util-src/poll.c
+++ b/util-src/poll.c
@@ -316,6 +316,11 @@ int Lwait(lua_State *L) {
lua_pushstring(L, "timeout");
return 2;
}
+ else if(ret < 0 && errno == EINTR) {
+ lua_pushnil(L);
+ lua_pushstring(L, "signal");
+ return 2;
+ }
else if(ret < 0) {
ret = errno;
lua_pushnil(L);