diff options
Diffstat (limited to 'daemon/bindings/event.c')
-rw-r--r-- | daemon/bindings/event.c | 17 |
1 files changed, 1 insertions, 16 deletions
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"); |