Software /
code /
prosody
Comparison
util-src/poll.c @ 9508:2055b497b515
net.server_epoll: Special handling of signal interrupts
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 12 Oct 2018 03:22:09 +0200 |
parent | 9507:33d21f020b66 |
child | 9954:36280801ddf1 |
comparison
equal
deleted
inserted
replaced
9507:33d21f020b66 | 9508:2055b497b515 |
---|---|
314 if(ret == 0) { | 314 if(ret == 0) { |
315 lua_pushnil(L); | 315 lua_pushnil(L); |
316 lua_pushstring(L, "timeout"); | 316 lua_pushstring(L, "timeout"); |
317 return 2; | 317 return 2; |
318 } | 318 } |
319 else if(ret < 0 && errno == EINTR) { | |
320 lua_pushnil(L); | |
321 lua_pushstring(L, "signal"); | |
322 return 2; | |
323 } | |
319 else if(ret < 0) { | 324 else if(ret < 0) { |
320 ret = errno; | 325 ret = errno; |
321 lua_pushnil(L); | 326 lua_pushnil(L); |
322 lua_pushstring(L, strerror(ret)); | 327 lua_pushstring(L, strerror(ret)); |
323 lua_pushinteger(L, ret); | 328 lua_pushinteger(L, ret); |