Skip to content

Commit a758e89

Browse files
committed
Work around libUV/glib event loop problem
To quote Jameson: > This is monitoring the kevent for libuv events, but for some reason > we’re getting back G_IO_NVAL (The file descriptor is not open), > and we don’t handle errors
1 parent 723b85c commit a758e89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/GLib/signals.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ function __init__gmainloop__()
349349
ccall((:g_source_set_callback, GLib.libglib), Nothing, (Ptr{Nothing}, Ptr{Nothing}, UInt, Ptr{Nothing}),
350350
src, @cfunction(g_yield, Cint, (UInt,)), 1, C_NULL)
351351

352-
uv_fd = Sys.iswindows() ? -1 : ccall(:uv_backend_fd, Cint, (Ptr{Nothing},), Base.eventloop())
352+
uv_fd = (Sys.iswindows() || Sys.isapple()) ? -1 : ccall(:uv_backend_fd, Cint, (Ptr{Nothing},), Base.eventloop())
353353
global uv_pollfd = _GPollFD(uv_fd, typemax(Cushort))
354354
if (uv_pollfd::_GPollFD).fd != -1
355355
ccall((:g_source_add_poll, GLib.libglib), Nothing, (Ptr{Nothing}, Ptr{_GPollFD}), src, Ref(uv_pollfd::_GPollFD))

0 commit comments

Comments
 (0)