feat: make IsFailureSignalHandlerInstalled public (#1033)

This commit is contained in:
Sergiu Deitsch 2024-01-05 00:13:04 +01:00 committed by GitHub
parent 8dd7abfdec
commit 8fbad2cb9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 7 deletions

View File

@ -959,9 +959,6 @@ template <bool>
struct CompileAssert {};
struct CrashReason;
// Returns true if FailureSignalHandler is installed.
// Needs to be exported since it's used by the signalhandler_unittest.
GLOG_EXPORT bool IsFailureSignalHandlerInstalled();
} // namespace glog_internal_namespace_
#define LOG_EVERY_N(severity, n) \
@ -1648,6 +1645,9 @@ class GLOG_EXPORT NullStreamFatal : public NullStream {
// words, stack traces of other threads won't be shown.
GLOG_EXPORT void InstallFailureSignalHandler();
// Returns true if FailureSignalHandler is installed.
GLOG_EXPORT bool IsFailureSignalHandlerInstalled();
// Installs a function that is used for writing the failure dump. "data"
// is the pointer to the beginning of a message to be written, and "size"
// is the size of the message. You should not expect the data is

View File

@ -348,8 +348,6 @@ void FailureSignalHandler(int signal_number, siginfo_t* signal_info,
} // namespace
namespace glog_internal_namespace_ {
bool IsFailureSignalHandlerInstalled() {
#ifdef HAVE_SIGACTION
// TODO(andschwa): Return kFailureSignalHandlerInstalled?
@ -366,8 +364,6 @@ bool IsFailureSignalHandlerInstalled() {
return false;
}
} // namespace glog_internal_namespace_
void InstallFailureSignalHandler() {
#ifdef HAVE_SIGACTION
// Build the sigaction struct.