aboutsummaryrefslogtreecommitdiffstats
path: root/util-src/poll.c
Commit message (Collapse)AuthorAgeFilesLines
* util-src: Use the luaL_pushfail API added in Lua 5.4 to highlight all ↵Kim Alvefur2020-06-071-10/+15
| | | | | | | failure conditions Actually just an alias of pushnil, but it does make it more obvious where the failure conditions are, which is good for readability.
* util.poll: Add missing return statements in fallback modeKim Alvefur2019-07-281-0/+2
| | | | | | | These allowed modifying or deleting select() state for unregistered FDs. During normal usage this should never happen. Modifying one that isn't set might cause weirdness but deleting an already deleted FD isn't a problem.
* util.poll: Minimize scope of methodsKim Alvefur2019-04-131-9/+9
| | | | File scope is enough
* net.server_epoll: Special handling of signal interruptsKim Alvefur2018-10-121-0/+5
|
* net.server_epoll: Ignore ENOENT when deregitering socketKim Alvefur2018-10-121-1/+2
| | | | It should not really happen
* net.server_epoll: Graceful handling of registering already added socketKim Alvefur2018-10-121-1/+7
|
* util.poll: Fix inverted logicKim Alvefur2018-10-111-1/+1
|
* util.poll: Handle failed epoll FD creationKim Alvefur2018-10-111-1/+12
|
* util.poll: Early return from __gc in case of no valid epoll FDKim Alvefur2018-10-111-0/+4
| | | | | This could happen if the epoll FD has already been closed or the epoll_create call failed
* util.poll: Increase max epoll events per callKim Alvefur2018-10-081-1/+1
| | | | | | | | | | This makes the struct roughly the same size in both epoll and select mode (64bit). There doesn’t seem to be much guidance on an appropriate size, it does not seem to matter too much since if there are more events they will simply show up in the next epoll_wait call. The number of exactly concurrent events should be fairly low most of the time anyways.
* util.poll: Zero FD sets watched for errors on creationKim Alvefur2018-10-071-0/+2
|
* net.poll: Guard against negative or too large FDsKim Alvefur2018-10-071-0/+14
|
* util.poll: Fix missing return for adding duplicate FDKim Alvefur2018-10-071-0/+1
|
* util.poll: Tweak metatable name fieldKim Alvefur2018-10-061-2/+2
|
* util.poll: Fix monitoring of socket exceptions in select modeKim Alvefur2018-10-061-1/+1
| | | | | Since state->err is a set of all watched FDs, this mistake caused all sockets to appear to have errors.
* util.poll: Lua 5.1 compatKim Alvefur2018-09-151-0/+6
|
* util.poll: Remove 'inline' from function declarationKim Alvefur2018-09-151-1/+1
| | | | Why does this fix building?
* util.poll: Import poll library with epoll and select supportKim Alvefur2018-05-161-0/+424