summaryrefslogtreecommitdiff
path: root/absl
diff options
context:
space:
mode:
authorGravatar Yasushi Saito <yasushi.saito@gmail.com>2021-04-13 19:59:46 -0700
committerGravatar GitHub <noreply@github.com>2021-04-13 22:59:46 -0400
commitdb1b7310d7021700b5a7bcea1989b2a625529f40 (patch)
treede9ffc376648373da3165d2360e7245d6de606ab /absl
parent25bc82d7ef481bd06723aae805d286eba81900ca (diff)
Call FailureSignalHandlerOptions.writenfn with nullptr at the end (#938)
* Call FailureSignalHandlerOptions.writenfn with nullptr at the end This behavior has already been alluded to in the document, but it hasn't been implemented. This PR calls changes the failure signal handler to call writerfn(nullptr) at the end of the message block. It also clarifies the documentation. https://github.com/abseil/abseil-cpp/issues/933 * Update failure_signal_handler.h Co-authored-by: Derek Mauro <761129+derekmauro@users.noreply.github.com>
Diffstat (limited to 'absl')
-rw-r--r--absl/debugging/failure_signal_handler.cc1
-rw-r--r--absl/debugging/failure_signal_handler.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/absl/debugging/failure_signal_handler.cc b/absl/debugging/failure_signal_handler.cc
index a9ed6ef9..e458a795 100644
--- a/absl/debugging/failure_signal_handler.cc
+++ b/absl/debugging/failure_signal_handler.cc
@@ -366,6 +366,7 @@ static void AbslFailureSignalHandler(int signo, siginfo_t*, void* ucontext) {
// goes after this point.
if (fsh_options.writerfn != nullptr) {
WriteFailureInfo(signo, ucontext, my_cpu, fsh_options.writerfn);
+ fsh_options.writerfn(nullptr);
}
if (fsh_options.call_previous_handler) {
diff --git a/absl/debugging/failure_signal_handler.h b/absl/debugging/failure_signal_handler.h
index 0c0f585d..500115c0 100644
--- a/absl/debugging/failure_signal_handler.h
+++ b/absl/debugging/failure_signal_handler.h
@@ -90,7 +90,7 @@ struct FailureSignalHandlerOptions {
// 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 may also be called with null data, as a hint
+ // 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.
//