Will I need to modify the JULIA_CB macro to not look for that _uv_hook
string?  I don't really feel ready to poke at those macros.


On Mon, May 13, 2013 at 4:25 PM, Jameson Nash <notifications@github.com>wrote:

> In src/jl_uv.c:
>
> > @@ -290,7 +296,26 @@ DLLEXPORT void jl_close_uv(uv_handle_t *handle)
> >         return;
> >      if (handle->type==UV_TTY)
> >          uv_tty_set_mode((uv_tty_t*)handle,0);
> > -    uv_close(handle,&closeHandle);
> > +
> > +    if (handle->type == UV_NAMED_PIPE || handle->type == UV_TCP) {
> > +        // Make sure that the stream has not already been marked closed in Julia, which would cause a hang.
> > +        // and has not been marked not writable by libuv (eg. by calling uv_shutdown on Windows), which would cause an abort.
> > +        jl_function_t* jl_is_open = (jl_function_t*) jl_get_global(jl_base_module, jl_symbol("isopen"));
>
> right. although it's slightly more annoying than just caching, since
> during sysimg.jl compile we have two jl_base_module's to look in. using the
> JULIA_CB macro is probably the way to go here
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/JuliaLang/julia/pull/3084/files#r4201936>
> .
>