feat: make IsFailureSignalHandlerInstalled public (#1033)
This commit is contained in:
parent
8dd7abfdec
commit
8fbad2cb9c
@ -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
|
||||
|
||||
@ -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.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user