Skip to content

Best practices for clean-up after segfault / custom signal handler #848

Answered by supervacuus
daniel-falk asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, @daniel-falk! If you are asking for a solution specifically when a crash occurs, the preferred method would be to implement your shutdown by using our on_crash-hook which will be called from the crash handler before the crash snapshot is generated (not only for SIGSEGV but all hard-exceptions).

Here is the link to the docs: https://docs.sentry.io/platforms/native/configuration/filtering/#using-on_crash
And a bit more detailed in the header docs:

* Type of the `on_crash` callback.
*
* The `on_crash` callback replaces the `before_send` callback for crash events.
* The interface is analogous to `bef…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@tian-yu-ocado
Comment options

@supervacuus
Comment options

@tian-yu-ocado
Comment options

@supervacuus
Comment options

@tian-yu-ocado
Comment options

Answer selected by supervacuus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants