# HG changeset patch # User Kim Alvefur # Date 1539307329 -7200 # Node ID 2055b497b5150a47fbd66ac643a73d7b32d65653 # Parent 33d21f020b66578b812b7c1f1df0ded1430f5842 net.server_epoll: Special handling of signal interrupts diff -r 33d21f020b66 -r 2055b497b515 net/server_epoll.lua --- a/net/server_epoll.lua Fri Oct 12 03:21:11 2018 +0200 +++ b/net/server_epoll.lua Fri Oct 12 03:22:09 2018 +0200 @@ -742,7 +742,7 @@ log("debug", "Removing unknown fd %d", fd); poll:del(fd); end - elseif r ~= "timeout" then + elseif r ~= "timeout" and r ~= "signal" then log("debug", "epoll_wait error: %s[%d]", r, w); end until once or (quitting and next(fds) == nil); diff -r 33d21f020b66 -r 2055b497b515 util-src/poll.c --- a/util-src/poll.c Fri Oct 12 03:21:11 2018 +0200 +++ b/util-src/poll.c Fri Oct 12 03:22:09 2018 +0200 @@ -316,6 +316,11 @@ 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);