From 41adb341b8c51fbb7d075abe05e80080358406ea Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Wed, 15 Sep 2021 10:19:47 -0400 Subject: [PATCH] Ignore SIGPIPE in the bssl tool. Bug: 435 Change-Id: I0ed94d40d04ebc26c9996dfe2b947a6e2f140a89 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/49465 Reviewed-by: Adam Langley --- tool/tool.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tool/tool.cc b/tool/tool.cc index 7bec7a2b6..96bde3335 100644 --- a/tool/tool.cc +++ b/tool/tool.cc @@ -24,6 +24,7 @@ #include #else #include +#include #endif #include "internal.h" @@ -106,6 +107,8 @@ int main(int argc, char **argv) { perror("_setmode(_fileno(stderr), O_BINARY)"); return 1; } +#else + signal(SIGPIPE, SIG_IGN); #endif CRYPTO_library_init();