From 5b604dd360ffc162f163962ccb2b1af109a5f93f Mon Sep 17 00:00:00 2001 From: B Stack Date: Thu, 17 Oct 2019 15:59:39 -0400 Subject: add upstream 10.17 --- zen/shutdown.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'zen/shutdown.cpp') diff --git a/zen/shutdown.cpp b/zen/shutdown.cpp index 4fc687d6..5ce586f0 100644 --- a/zen/shutdown.cpp +++ b/zen/shutdown.cpp @@ -33,8 +33,9 @@ void zen::suspendSystem() //throw FileError void zen::terminateProcess(int exitCode) { - std::exit(exitCode); //[[noreturn]]; "Stack is not unwound: destructors of variables with automatic storage duration are not called." => perfect - //don't use std::abort() => crashes process with "EXC_CRASH (SIGABRT)" on macOS + std::quick_exit(exitCode); //[[noreturn]]; "Causes normal program termination to occur without completely cleaning the resources." => perfect + + for (;;) //why still here?? => crash deliberately! *reinterpret_cast(0) = 0; //crude but at least we'll get crash dumps if it ever happens } -- cgit