diff options
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | daemon/bindings/event.c | 17 |
2 files changed, 2 insertions, 16 deletions
@@ -12,6 +12,7 @@ Bugfixes that were loaded as unmanaged trust anchors (!753) - trust_anchors.add(): include these TAs in .summary() (!753) - policy module: support '#' for separating port numbers, for consistency +- fix startup on macOS+BSD when </dev/null and cqueues installed Improvements ------------ diff --git a/daemon/bindings/event.c b/daemon/bindings/event.c index c665dac6..98180f75 100644 --- a/daemon/bindings/event.c +++ b/daemon/bindings/event.c @@ -185,24 +185,9 @@ static int event_fdwatch(lua_State *L) /* Start timer with the reference */ int sock = lua_tointeger(L, 1); uv_loop_t *loop = uv_default_loop(); -#if defined(__APPLE__) || defined(__FreeBSD__) - /* libuv is buggy and fails to create poller for - * kqueue sockets as it can't be fcntl'd to non-blocking mode, - * so we pass it a copy of standard input and then - * switch it with real socket before starting the poller - */ - int decoy_fd = dup(STDIN_FILENO); - int ret = uv_poll_init(loop, handle, decoy_fd); - if (ret == 0) { - handle->io_watcher.fd = sock; - } - close(decoy_fd); -#else int ret = uv_poll_init(loop, handle, sock); -#endif - if (ret == 0) { + if (ret == 0) ret = uv_poll_start(handle, UV_READABLE, event_fdcallback); - } if (ret != 0) { free(handle); lua_error_p(L, "couldn't start event poller"); |