MCPcopy Create free account
hub / github.com/boostorg/stacktrace / print_signal_handler_and_exit

Function print_signal_handler_and_exit

example/debug_function.cpp:13–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11#include <cstdlib> // std::exit
12
13void print_signal_handler_and_exit() {
14 typedef void(*function_t)(int);
15
16 function_t old_signal_function = ::signal(SIGSEGV, SIG_DFL);
17 boost::stacktrace::frame f(old_signal_function);
18 std::cout << f << std::endl;
19 std::exit(0);
20}
21//]
22
23

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected