about summary refs log tree commit diff
path: root/src/rt/rust_uv.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rt/rust_uv.cpp')
-rw-r--r--src/rt/rust_uv.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/rt/rust_uv.cpp b/src/rt/rust_uv.cpp
index 43e6b97bc18..f90931dbea9 100644
--- a/src/rt/rust_uv.cpp
+++ b/src/rt/rust_uv.cpp
@@ -13,12 +13,21 @@
 #include <malloc.h>
 #endif
 
+#ifndef __WIN32__
+// for signal
+#include <signal.h>
+#endif
+
 #include "uv.h"
 
 #include "rust_globals.h"
 
 extern "C" void*
 rust_uv_loop_new() {
+// XXX libuv doesn't always ignore SIGPIPE even though we don't need it.
+#ifndef __WIN32__
+    signal(SIGPIPE, SIG_IGN);
+#endif 
     return (void*)uv_loop_new();
 }