diff options
-rw-r--r-- | absl/base/internal/raw_logging.cc | 4 | ||||
-rw-r--r-- | absl/base/internal/raw_logging.h | 2 | ||||
-rw-r--r-- | absl/debugging/failure_signal_handler.cc | 3 |
3 files changed, 4 insertions, 5 deletions
diff --git a/absl/base/internal/raw_logging.cc b/absl/base/internal/raw_logging.cc index 5ea49bca..c866d957 100644 --- a/absl/base/internal/raw_logging.cc +++ b/absl/base/internal/raw_logging.cc @@ -177,7 +177,7 @@ void RawLogVA(absl::LogSeverity severity, const char* file, int line, } else { DoRawLog(&buf, &size, "%s", kTruncated); } - AsyncSignalSafeWriteToStderr(buffer, strlen(buffer)); + AsyncSignalSafeWriteError(buffer, strlen(buffer)); } #else static_cast<void>(format); @@ -205,7 +205,7 @@ void DefaultInternalLog(absl::LogSeverity severity, const char* file, int line, } // namespace -void AsyncSignalSafeWriteToStderr(const char* s, size_t len) { +void AsyncSignalSafeWriteError(const char* s, size_t len) { absl::base_internal::ErrnoSaver errno_saver; #if defined(__EMSCRIPTEN__) // In WebAssembly, bypass filesystem emulation via fwrite. diff --git a/absl/base/internal/raw_logging.h b/absl/base/internal/raw_logging.h index 3f852d31..b79550b2 100644 --- a/absl/base/internal/raw_logging.h +++ b/absl/base/internal/raw_logging.h @@ -130,7 +130,7 @@ void RawLog(absl::LogSeverity severity, const char* file, int line, // Writes the provided buffer directly to stderr, in a signal-safe, low-level // manner. Preserves errno. -void AsyncSignalSafeWriteToStderr(const char* s, size_t len); +void AsyncSignalSafeWriteError(const char* s, size_t len); // compile-time function to get the "base" filename, that is, the part of // a filename after the last "/" or "\" path separator. The search starts at diff --git a/absl/debugging/failure_signal_handler.cc b/absl/debugging/failure_signal_handler.cc index 0db2a896..fd6a4927 100644 --- a/absl/debugging/failure_signal_handler.cc +++ b/absl/debugging/failure_signal_handler.cc @@ -378,8 +378,7 @@ static void AbslFailureSignalHandler(int signo, siginfo_t*, void* ucontext) { // First write to stderr. WriteFailureInfo( signo, ucontext, my_cpu, +[](const char* data) { - absl::raw_log_internal::AsyncSignalSafeWriteToStderr(data, - strlen(data)); + absl::raw_log_internal::AsyncSignalSafeWriteError(data, strlen(data)); }); // Riskier code (because it is less likely to be async-signal-safe) |