From 7630b5b73317f8fb2a1ef4e663984852affdd564 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Wed, 26 Oct 2016 22:42:22 +0300 Subject: [PATCH] Fix compilation --- example/getting_started.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/example/getting_started.cpp b/example/getting_started.cpp index 74ca0b1..c8a80f1 100644 --- a/example/getting_started.cpp +++ b/example/getting_started.cpp @@ -99,9 +99,7 @@ void my_terminate_handler() { void my_signal_handler(int signum) { boost::stacktrace::stacktrace bt; if (bt) { - std::cerr << "Signal " << signum << ", backtrace:\n" << boost::stacktrace::stacktrace() << '\n'; ``[footnote Strictly -speaking this code is not async-signal-safe, but we have SIGSEGV already it could hardly become worse. -[link boost_stacktrace.build_macros_and_backends Section "Build, Macros and Backends"] describes async-signal-safe backends, so if you will use the noop backend code becomes absolutely valid as that backens always returns 0 frames and `operator<<` will be never called. ]`` + std::cerr << "Signal " << signum << ", backtrace:\n" << boost::stacktrace::stacktrace() << '\n'; // ``[footnote Strictly speaking this code is not async-signal-safe, but we have SIGSEGV already it could hardly become worse. [link boost_stacktrace.build_macros_and_backends Section "Build, Macros and Backends"] describes async-signal-safe backends, so if you will use the noop backend code becomes absolutely valid as that backens always returns 0 frames and `operator<<` will be never called. ]`` } std::abort(); }