Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make IsFailureSignalHandlerInstalled public #1033

Merged
merged 1 commit into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/glog/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -967,9 +967,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) \
Expand Down Expand Up @@ -1656,6 +1653,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
Expand Down
4 changes: 0 additions & 4 deletions src/signalhandler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand All @@ -366,8 +364,6 @@ bool IsFailureSignalHandlerInstalled() {
return false;
}

} // namespace glog_internal_namespace_

void InstallFailureSignalHandler() {
#ifdef HAVE_SIGACTION
// Build the sigaction struct.
Expand Down