Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Work around libUV/glib event loop problem
Browse files Browse the repository at this point in the history
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
  • Loading branch information
staticfloat committed Oct 17, 2019
1 parent 723b85c commit a758e89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/GLib/signals.jl
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ function __init__gmainloop__()
ccall((:g_source_set_callback, GLib.libglib), Nothing, (Ptr{Nothing}, Ptr{Nothing}, UInt, Ptr{Nothing}),
src, @cfunction(g_yield, Cint, (UInt,)), 1, C_NULL)

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

0 comments on commit a758e89

Please sign in to comment.