summaryrefslogtreecommitdiff
path: root/absl/debugging
diff options
context:
space:
mode:
authorGravatar Andy Getzendanner <durandal@google.com>2022-05-04 20:58:05 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2022-05-04 20:58:54 -0700
commit173dfe4a4c70f294a512aae4d0d0f5fc7db39241 (patch)
tree69713a45f8fb1ad3874a0f7e1e0a50b40f7d001a /absl/debugging
parente8cda74967d1fa43182f88396e9030e93501e1a1 (diff)
raw_logging: Rename SafeWriteToStderr to indicate what about it is safe (answer: it's async-signal-safe).
Also, preserve errno across calls to make it actually signal-safe. PiperOrigin-RevId: 446620926 Change-Id: I875fbec02b909e8424ddf763303b0d6007f8548f
Diffstat (limited to 'absl/debugging')
-rw-r--r--absl/debugging/BUILD.bazel1
-rw-r--r--absl/debugging/CMakeLists.txt1
-rw-r--r--absl/debugging/failure_signal_handler.cc4
3 files changed, 1 insertions, 5 deletions
diff --git a/absl/debugging/BUILD.bazel b/absl/debugging/BUILD.bazel
index 7f5c1cad..dce59e1d 100644
--- a/absl/debugging/BUILD.bazel
+++ b/absl/debugging/BUILD.bazel
@@ -143,7 +143,6 @@ cc_library(
"//absl/base",
"//absl/base:config",
"//absl/base:core_headers",
- "//absl/base:errno_saver",
"//absl/base:raw_logging_internal",
],
)
diff --git a/absl/debugging/CMakeLists.txt b/absl/debugging/CMakeLists.txt
index 7507ff3b..32952734 100644
--- a/absl/debugging/CMakeLists.txt
+++ b/absl/debugging/CMakeLists.txt
@@ -126,7 +126,6 @@ absl_cc_library(
absl::base
absl::config
absl::core_headers
- absl::errno_saver
absl::raw_logging_internal
PUBLIC
)
diff --git a/absl/debugging/failure_signal_handler.cc b/absl/debugging/failure_signal_handler.cc
index 3fe8827a..affade3b 100644
--- a/absl/debugging/failure_signal_handler.cc
+++ b/absl/debugging/failure_signal_handler.cc
@@ -42,7 +42,6 @@
#include <ctime>
#include "absl/base/attributes.h"
-#include "absl/base/internal/errno_saver.h"
#include "absl/base/internal/raw_logging.h"
#include "absl/base/internal/sysinfo.h"
#include "absl/debugging/internal/examine_stack.h"
@@ -217,8 +216,7 @@ static void InstallOneFailureHandler(FailureSignalData* data,
#endif
static void WriteToStderr(const char* data) {
- absl::base_internal::ErrnoSaver errno_saver;
- absl::raw_logging_internal::SafeWriteToStderr(data, strlen(data));
+ absl::raw_logging_internal::AsyncSignalSafeWriteToStderr(data, strlen(data));
}
static void WriteSignalMessage(int signo, int cpu,