mirror of
https://github.com/abseil/abseil-cpp.git
synced 2026-06-04 12:07:05 +08:00
stacktrace_test: avoid spoiling errno in the test signal handler.
PiperOrigin-RevId: 800031515 Change-Id: Ica41c41d176d2ea1ab148e656bf49921098a0411
This commit is contained in:
committed by
Copybara-Service
parent
5ad0bfb7ab
commit
72d59c9617
@@ -27,6 +27,7 @@
|
||||
#include "gtest/gtest.h"
|
||||
#include "absl/base/attributes.h"
|
||||
#include "absl/base/config.h"
|
||||
#include "absl/base/internal/errno_saver.h"
|
||||
#include "absl/base/optimization.h"
|
||||
#include "absl/types/span.h"
|
||||
|
||||
@@ -414,6 +415,7 @@ const void* g_return_address = nullptr;
|
||||
bool g_sigusr2_raised = false;
|
||||
|
||||
void SigUsr2Handler(int, siginfo_t*, void* uc) {
|
||||
absl::base_internal::ErrnoSaver errno_saver;
|
||||
// Many platforms don't support this by default.
|
||||
bool support_is_expected = false;
|
||||
constexpr int kMaxStackDepth = 64;
|
||||
|
||||
Reference in New Issue
Block a user