absl::FailureSignalHandlerOptions::writerfn

If non-null, indicates a pointer to a callback function that will be called upon failure, with a string argument containing failure data. This function may be used as a hook to write failure data to a secondary location, such as a log file. This function will also be called with null data, as a hint to flush any buffered data before the program may be terminated. Consider flushing any buffered data in all calls to this function.

Synopsis

Declared in <absl/debugging/failure_signal_handler.h>

void(* writerfn)(char const*) = nullptr;

Description

Since this function runs within a signal handler, it should be async-signal-safe if possible. See http://man7.org/linux/man-pages/man7/signal-safety.7.html