diff options
| author | Eric Reed <ecreed@cs.washington.edu> | 2013-08-08 17:04:19 -0700 |
|---|---|---|
| committer | Eric Reed <ecreed@cs.washington.edu> | 2013-08-19 16:26:50 -0700 |
| commit | 88f718341ec279738c07f83289058aadf7c5d235 (patch) | |
| tree | 6f6b3b771f2b211c293aaa6ea83a0000056d1985 /src/rt/rust_uv.cpp | |
| parent | f68514c128e536c5868368861871cb665ed9fdd3 (diff) | |
| download | rust-88f718341ec279738c07f83289058aadf7c5d235.tar.gz rust-88f718341ec279738c07f83289058aadf7c5d235.zip | |
Instruct event loops to ignore SIGPIPE when constructed.
libuv does not always catch SIGPIPE.
Diffstat (limited to 'src/rt/rust_uv.cpp')
| -rw-r--r-- | src/rt/rust_uv.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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 <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(); } |
