Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | net.server_epoll: Graceful handling of registering already added socket | Kim Alvefur | 2018-10-12 | 1 | -1/+7 |
| | |||||
* | util.poll: Fix inverted logic | Kim Alvefur | 2018-10-11 | 1 | -1/+1 |
| | |||||
* | util.poll: Handle failed epoll FD creation | Kim Alvefur | 2018-10-11 | 1 | -1/+12 |
| | |||||
* | util.poll: Early return from __gc in case of no valid epoll FD | Kim Alvefur | 2018-10-11 | 1 | -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 call | Kim Alvefur | 2018-10-08 | 1 | -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 creation | Kim Alvefur | 2018-10-07 | 1 | -0/+2 |
| | |||||
* | net.poll: Guard against negative or too large FDs | Kim Alvefur | 2018-10-07 | 1 | -0/+14 |
| | |||||
* | util.poll: Fix missing return for adding duplicate FD | Kim Alvefur | 2018-10-07 | 1 | -0/+1 |
| | |||||
* | util.poll: Tweak metatable name field | Kim Alvefur | 2018-10-06 | 1 | -2/+2 |
| | |||||
* | util.poll: Fix monitoring of socket exceptions in select mode | Kim Alvefur | 2018-10-06 | 1 | -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 compat | Kim Alvefur | 2018-09-15 | 1 | -0/+6 |
| | |||||
* | util.poll: Remove 'inline' from function declaration | Kim Alvefur | 2018-09-15 | 1 | -1/+1 |
| | | | | Why does this fix building? | ||||
* | util.poll: Import poll library with epoll and select support | Kim Alvefur | 2018-05-16 | 2 | -1/+425 |
| | |||||
* | util.pposix: Allow _DARWIN_C_SOURCE to be overriden | Kim Alvefur | 2018-09-08 | 1 | -0/+2 |
| | | | | Like the others there | ||||
* | Merge 0.10->trunk | Kim Alvefur | 2018-09-08 | 1 | -0/+3 |
|\ | |||||
| * | util.pposix: Fix or silence a warning on OS X (#1202) | Kim Alvefur | 2018-09-08 | 1 | -0/+3 |
| | | |||||
* | | Merge 0.10->trunk | Kim Alvefur | 2018-09-08 | 1 | -1/+1 |
|\| | |||||
| * | util.pposix: Fix building on OS X (#1202) | Kim Alvefur | 2018-08-18 | 1 | -1/+1 |
| | | |||||
* | | util.pposix: Restrict use of malloc_info to glibc | Kim Alvefur | 2018-09-07 | 1 | -1/+1 |
| | | | | | | | | Fixes build on musl based distros like Alpine linux | ||||
* | | util.pposix: Do not attempt to assign to stdio variables [pedantic] | Kim Alvefur | 2018-09-07 | 1 | -3/+3 |
| | | | | | | | | | | | | Fixes build on gcc 6.4.0 See also https://stackoverflow.com/a/586416 | ||||
* | | util-src/makefile: Add util.time to BSD makefile | Kim Alvefur | 2018-08-11 | 1 | -1/+1 |
| | | |||||
* | | util.time: Allow for already set constant | Kim Alvefur | 2018-08-11 | 1 | -0/+2 |
| | | |||||
* | | util.time: Add monotonic time | Kim Alvefur | 2017-03-09 | 1 | -0/+9 |
| | | |||||
* | | util.time: Convert to C | Kim Alvefur | 2017-03-09 | 2 | -1/+25 |
| | | |||||
* | | encodings: Explicitly say that base64 decoding falls through in a switch, ↵ | Emmanuel Gil Peyrot | 2018-08-08 | 1 | -0/+2 |
| | | | | | | | | fixes a warning in gcc 7+. | ||||
* | | pposix: Generate an error when a passed string isn’t "unlimited". | Emmanuel Gil Peyrot | 2018-08-08 | 1 | -0/+1 |
| | | |||||
* | | pposix, signal: Ignore unused arguments. | Emmanuel Gil Peyrot | 2018-08-08 | 2 | -0/+3 |
| | | |||||
* | | net, pposix, signal: Check for redefined defines, fix warnings. | Emmanuel Gil Peyrot | 2018-08-08 | 3 | -0/+11 |
| | | |||||
* | | util.pposix: Use freopen(3) when replacing standard IO streams (thanks ↵ | Kim Alvefur | 2018-07-12 | 1 | -7/+3 |
| | | | | | | | | | | | | ratchetfreak) Man page says this is what freopen(3) is for. | ||||
* | | util.ringbuffer: Fix typo in comment [codespell] | Kim Alvefur | 2018-04-06 | 1 | -1/+1 |
| | | |||||
* | | Add makefiles compatible with BSD make | Kim Alvefur | 2018-03-11 | 1 | -0/+44 |
| | | |||||
* | | Rename Makefile -> GNUmakefile to reflect dependency on GNU Make | Kim Alvefur | 2017-10-31 | 1 | -1/+1 |
| | | |||||
* | | util.ringbuffer: Add method for discarding buffered data without returning ↵ | Kim Alvefur | 2018-02-24 | 1 | -0/+23 |
| | | | | | | | | it to lua | ||||
* | | util.ringbuffer: Add various comments | Kim Alvefur | 2018-02-24 | 1 | -0/+19 |
| | | |||||
* | | util.crand: Return early if a zero bytes are requested | Kim Alvefur | 2017-12-03 | 1 | -1/+5 |
| | | |||||
* | | util.crand: Throw an error for sizes smaller than 1 byte | Kim Alvefur | 2017-12-03 | 1 | -1/+3 |
| | | |||||
* | | util.crand: Make it possible to use arc4random on Linux (needs libbsd) | Kim Alvefur | 2017-12-03 | 1 | -1/+5 |
| | | |||||
* | | util.crand: Use a small buffer on the stack for small pieces of random, ↵ | Kim Alvefur | 2017-12-03 | 1 | -1/+11 |
| | | | | | | | | should be faster | ||||
* | | util.crand: Remove unneeded cast | Kim Alvefur | 2017-12-03 | 1 | -1/+1 |
| | | |||||
* | | util.crand: Silence signedness warning | Kim Alvefur | 2017-12-03 | 1 | -1/+1 |
| | | |||||
* | | util.crand: Only keep return value of getrandom() as the others don't return ↵ | Kim Alvefur | 2017-12-02 | 1 | -14/+6 |
| | | | | | | | | partial results | ||||
* | | util.crand: Try getrandom() again until buffer is filled | Kim Alvefur | 2017-12-02 | 1 | -5/+15 |
| | | |||||
* | | Merge 0.10->trunk | Kim Alvefur | 2017-12-01 | 1 | -2/+2 |
|\| | |||||
| * | util.signal: Fix loop (fixes #1047) | Kim Alvefur | 2017-11-30 | 1 | -2/+2 |
| | | | | | | | | | | A pre-commit version probably started with i = nsig and counted down, then an incomplete change to counting up was done | ||||
* | | util.net: Add bindings to inet_ntop and inet_pton | Kim Alvefur | 2017-11-26 | 1 | -0/+63 |
| | | |||||
* | | util.crand: Add comments about defines | Kim Alvefur | 2017-12-01 | 1 | -0/+2 |
| | | |||||
* | | util.crand: Apply formatter | Kim Alvefur | 2017-12-01 | 1 | -0/+1 |
| | | |||||
* | | util.crand: Reorder includes so system ones are first | Kim Alvefur | 2017-12-01 | 1 | -3/+2 |
| | | |||||
* | | util.crand: Always include stdlib to be sure __GLIBC_PREREQ is defined | Kim Alvefur | 2017-12-01 | 1 | -3/+3 |
|/ | |||||
* | util.signal: Use a static array to keep track of pending signals (fixes #1029) | Kim Alvefur | 2017-11-14 | 1 | -23/+12 |
| |