backward-cpp icon indicating copy to clipboard operation
backward-cpp copied to clipboard

Allow customization of signal handler in registration, add flushing

Open nextsilicon-itay-bookstein opened this issue 2 years ago • 1 comments

Thank you for making this library, it's very useful to us!

This PR tries to address a couple of minor pain points we encountered when using the library:

  • Makes signal handler installation logic reusable and allows for caller to specify an alternative handler (Linux/Darwin)
  • Adds flushing of the output streams from crash handlers

😄

Thank you for offering your work.

The signal handler that comes with backward-cpp is an example more than something ready for all use-cases. Consider it as a basic example ready for copy paste to make your own.

With my experience maintaining this library over the year, I have observed that implementation of signal handlers can change widely depending of the application (sync, async, threading etc). Therefore I think it is better to keep this outside of backward-cpp.

bombela avatar Oct 03 '22 20:10 bombela