Skip to content

Commit

Permalink
ref: Terminate from crashpad handler with sensible return code (#738)
Browse files Browse the repository at this point in the history
  • Loading branch information
supervacuus authored Jul 28, 2022
1 parent 6ac1404 commit 2ca30df
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/backends/sentry_backend_crashpad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ extern "C" {
#include "client/crashpad_info.h"
#include "client/prune_crash_reports.h"
#include "client/settings.h"
#if defined(_MSC_VER)
# include "util/win/termination_codes.h"
#endif

#if defined(__GNUC__)
# pragma GCC diagnostic pop
Expand Down Expand Up @@ -215,8 +218,8 @@ sentry__crashpad_handler(int signum, siginfo_t *info, ucontext_t *user_context)
// crashpad
if (!should_dump) {
# ifdef SENTRY_PLATFORM_WINDOWS
// TerminateProcess(GetCurrentProcess(), kTerminationCodeCrashNoDump);
TerminateProcess(GetCurrentProcess(), 1);
TerminateProcess(GetCurrentProcess(),
crashpad::TerminationCodes::kTerminationCodeCrashNoDump);
# else
_exit(EXIT_FAILURE);
# endif
Expand Down

0 comments on commit 2ca30df

Please sign in to comment.