diff options
author | Jim Ingham <jingham@apple.com> | 2016-12-21 00:12:54 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2016-12-21 00:12:54 +0000 |
commit | df1e4b697e4bd91cf30130756d3d29fa64b8b6d2 (patch) | |
tree | e20f086578bccee710dc88a5ff6663486ddde5dd /lldb/packages/Python/lldbsuite/test | |
parent | 6e3595d6c524e203464155f9ee1210af1195c513 (diff) | |
download | bcm5719-llvm-df1e4b697e4bd91cf30130756d3d29fa64b8b6d2.tar.gz bcm5719-llvm-df1e4b697e4bd91cf30130756d3d29fa64b8b6d2.zip |
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.
<rdar://problem/29740488>
llvm-svn: 290216
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/api/multithreaded/driver.cpp.template | 10 |
1 files changed, 10 insertions, 0 deletions
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 <iterator> #include <string> #include <vector> +#if !defined(_MSC_VER) + #include <signal.h> +#endif %include_SB_APIs% @@ -17,6 +20,13 @@ using namespace lldb; void test(SBDebugger &dbg, std::vector<string> 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(); |