-
-
Save indutny/062b7d111a961b902af8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/deps/uv/src/unix/core.c b/deps/uv/src/unix/core.c | |
index f3636e2..5d23190 100644 | |
--- a/deps/uv/src/unix/core.c | |
+++ b/deps/uv/src/unix/core.c | |
@@ -200,6 +200,11 @@ uv_loop_t* uv_default_loop(void) { | |
} | |
+void uv__syserr_cb(const char *msg) { | |
+ fprintf(stderr, "libev encountered nearly fatal error: %s\n", msg); | |
+} | |
+ | |
+ | |
uv_loop_t* uv_loop_new(void) { | |
uv_loop_t* loop; | |
diff --git a/deps/uv/src/unix/internal.h b/deps/uv/src/unix/internal.h | |
index dd46c95..4a8cfef 100644 | |
--- a/deps/uv/src/unix/internal.h | |
+++ b/deps/uv/src/unix/internal.h | |
@@ -121,6 +121,9 @@ void uv__io_stop(uv_loop_t* loop, uv__io_t* handle); | |
void uv__io_feed(uv_loop_t* loop, uv__io_t* handle, int event); | |
int uv__io_active(uv__io_t* handle); | |
+/* ev */ | |
+void uv__syserr_cb(const char *msg); | |
+ | |
/* loop */ | |
int uv__loop_init(uv_loop_t* loop, int default_loop); | |
void uv__loop_delete(uv_loop_t* loop); | |
diff --git a/deps/uv/src/unix/loop.c b/deps/uv/src/unix/loop.c | |
index fcf9faf..f280432 100644 | |
--- a/deps/uv/src/unix/loop.c | |
+++ b/deps/uv/src/unix/loop.c | |
@@ -51,6 +51,7 @@ int uv__loop_init(uv_loop_t* loop, int default_loop) { | |
loop->async_pipefd[1] = -1; | |
loop->ev = (default_loop ? ev_default_loop : ev_loop_new)(flags); | |
ev_set_userdata(loop->ev, loop); | |
+ ev_set_syserr_cb(uv__syserr_cb); | |
eio_channel_init(&loop->uv_eio_channel, loop); | |
#if __linux__ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment