From 88f718341ec279738c07f83289058aadf7c5d235 Mon Sep 17 00:00:00 2001 From: Eric Reed Date: Thu, 8 Aug 2013 17:04:19 -0700 Subject: Instruct event loops to ignore SIGPIPE when constructed. libuv does not always catch SIGPIPE. --- src/rt/rust_uv.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/rt/rust_uv.cpp') diff --git a/src/rt/rust_uv.cpp b/src/rt/rust_uv.cpp index 0462789af9f..b5d6e02b46a 100644 --- a/src/rt/rust_uv.cpp +++ b/src/rt/rust_uv.cpp @@ -13,12 +13,21 @@ #include #endif +#ifndef __WIN32__ +// for signal +#include +#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(); } -- cgit 1.4.1-3-g733a5