Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow customization of signal handler in registration, add flushing #259

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

nextsilicon-itay-bookstein

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

😄

This allows for easier wrapping of the already-publicly-exposed
handler logic without duplicating the registration logic in the
client.
@bombela
Copy link
Owner

bombela commented Oct 3, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants