I just noticed that using libuv 1.30.2 built in Ubuntu 16.04, if I call 'uv_close' on a 'uv_signal_t' which callback is going to be executed in the same loop iteration, the callback of this 'uv_close' is never executed, no matter how many times I call `uv_run`, even though it is 'uv_is_closing'.
The attached code illustrates the problem by writing 'uv_pipe_t' with the read end closed to cause a SIGPIPE. In the write callback I close the 'uv_pipe_t' and a `uv_signal_t' previously started with SIGPIPE. The 'uv_pipe_t' closes, but the 'uv_signal_t' never does.
I also noticed that if I close any other handler after 'uv_run' returns, then the 'uv_close' callback of the 'uv_signal_t' is called the next time I call 'uv_run'.
Does any one knows what I might be doing wrong in this code, or a workaround for this problem?
--