Skip to content

Commit 2ca30df

Browse files
authored
ref: Terminate from crashpad handler with sensible return code (#738)
1 parent 6ac1404 commit 2ca30df

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/backends/sentry_backend_crashpad.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ extern "C" {
3333
#include "client/crashpad_info.h"
3434
#include "client/prune_crash_reports.h"
3535
#include "client/settings.h"
36+
#if defined(_MSC_VER)
37+
# include "util/win/termination_codes.h"
38+
#endif
3639

3740
#if defined(__GNUC__)
3841
# pragma GCC diagnostic pop
@@ -215,8 +218,8 @@ sentry__crashpad_handler(int signum, siginfo_t *info, ucontext_t *user_context)
215218
// crashpad
216219
if (!should_dump) {
217220
# ifdef SENTRY_PLATFORM_WINDOWS
218-
// TerminateProcess(GetCurrentProcess(), kTerminationCodeCrashNoDump);
219-
TerminateProcess(GetCurrentProcess(), 1);
221+
TerminateProcess(GetCurrentProcess(),
222+
crashpad::TerminationCodes::kTerminationCodeCrashNoDump);
220223
# else
221224
_exit(EXIT_FAILURE);
222225
# endif

0 commit comments

Comments
 (0)