From c06ab77c3b64c3432f6d2db0e959b2547ce2ba34 Mon Sep 17 00:00:00 2001 From: Ewen McNeill Date: Wed, 23 Jul 2014 13:39:45 +1200 Subject: [PATCH] z/OS: signal(SIGPIPE, SIG_IGN) for tests Updated: tests/testutil.hpp: Add signal(SIGPIPE, SIG_IGN) to setup_test_environment(), on z/OS (__MVS__) --- tests/testutil.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/testutil.hpp b/tests/testutil.hpp index 31db1e40..20185210 100644 --- a/tests/testutil.hpp +++ b/tests/testutil.hpp @@ -262,6 +262,11 @@ void setup_test_environment() _CrtSetReportFile( _CRT_ASSERT, _CRTDBG_FILE_STDERR ); # endif #endif +#if defined __MVS__ + // z/OS UNIX System Services: Ignore SIGPIPE during test runs, as a + // workaround for no SO_NOGSIGPIPE socket option. + signal(SIGPIPE, SIG_IGN); +#endif } // Provide portable millisecond sleep