aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/server_epoll.lua2
-rw-r--r--util-src/poll.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index cb83c8c3..0d05aee1 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -742,7 +742,7 @@ local function loop(once)
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 --git a/util-src/poll.c b/util-src/poll.c
index e5b5f70c..0ca0cf28 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);