From: Christopher Dykes Date: Thu, 4 Aug 2016 22:37:49 +0000 (-0700) Subject: Don't try to ignore the SIGPIPE signal if it isn't defined X-Git-Tag: v2016.08.08.00~17 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d449fce25cf9df45be98c388d2cd117b022e32ce;p=folly.git Don't try to ignore the SIGPIPE signal if it isn't defined Summary: Which is the case when compiling under MSVC. Reviewed By: pixelb Differential Revision: D3671357 fbshipit-source-id: b7e51479cae44933c3f1caa21d45775a32f294a3 --- diff --git a/folly/io/async/test/AsyncSSLSocketTest.cpp b/folly/io/async/test/AsyncSSLSocketTest.cpp index dc604130..386f51ba 100644 --- a/folly/io/async/test/AsyncSSLSocketTest.cpp +++ b/folly/io/async/test/AsyncSSLSocketTest.cpp @@ -1890,6 +1890,7 @@ TEST(AsyncSSLSocketTest, ConnectTFOFallbackTimeout) { } // namespace +#ifdef SIGPIPE /////////////////////////////////////////////////////////////////////////// // init_unit_test_suite /////////////////////////////////////////////////////////////////////////// @@ -1901,3 +1902,4 @@ struct Initializer { }; Initializer initializer; } // anonymous +#endif diff --git a/folly/io/async/test/AsyncSSLSocketTest2.cpp b/folly/io/async/test/AsyncSSLSocketTest2.cpp index ac79d7af..e39f3b73 100644 --- a/folly/io/async/test/AsyncSSLSocketTest2.cpp +++ b/folly/io/async/test/AsyncSSLSocketTest2.cpp @@ -131,7 +131,9 @@ TEST(AsyncSSLSocketTest2, AttachDetachSSLContext) { } // folly int main(int argc, char *argv[]) { +#ifdef SIGPIPE signal(SIGPIPE, SIG_IGN); +#endif folly::SSLContext::setSSLLockTypes({ {CRYPTO_LOCK_EVP_PKEY, folly::SSLContext::LOCK_NONE}, {CRYPTO_LOCK_SSL_SESSION, folly::SSLContext::LOCK_SPINLOCK},