From df1e4b697e4bd91cf30130756d3d29fa64b8b6d2 Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Wed, 21 Dec 2016 00:12:54 +0000 Subject: Ignore SIGPIPE in the mini-driver used by these tests. We're seeing some very occasional failures in these tests where the mini-driver dies with a SIGPIPE. We don't use SIGPIPE for anything, and the main lldb driver program already ignores SIGPIPE, so ignoring it in the mini-driver is a good way to remove these spurious failures. llvm-svn: 290216 --- .../lldbsuite/test/api/multithreaded/driver.cpp.template | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lldb/packages/Python/lldbsuite/test/api/multithreaded') diff --git a/lldb/packages/Python/lldbsuite/test/api/multithreaded/driver.cpp.template b/lldb/packages/Python/lldbsuite/test/api/multithreaded/driver.cpp.template index adb1d200655..f4bd021632c 100644 --- a/lldb/packages/Python/lldbsuite/test/api/multithreaded/driver.cpp.template +++ b/lldb/packages/Python/lldbsuite/test/api/multithreaded/driver.cpp.template @@ -6,6 +6,9 @@ #include #include #include +#if !defined(_MSC_VER) + #include +#endif %include_SB_APIs% @@ -17,6 +20,13 @@ using namespace lldb; void test(SBDebugger &dbg, std::vector args); int main(int argc, char** argv) { + +// Ignore SIGPIPE. The lldb driver does this as well, +// because we seem to get spurious SIGPIPES on some +// Unixen that take the driver down. +#if !defined(_MSC_VER) + signal(SIGPIPE, SIG_IGN); +#endif int code = 0; SBDebugger::Initialize(); -- cgit v1.2.3