From 31481931e87fb39b8b05cb4e32a054549428b9e5 Mon Sep 17 00:00:00 2001 From: XXTH Date: Thu, 11 May 2023 20:46:36 +0200 Subject: [PATCH] added fix for onExit => https://torque3d.org/forums/topic/7261-fix-for-onexit-not-called-on-linuxbsd-posix/ --- Engine/source/platformPOSIX/POSIXProcessControl.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Engine/source/platformPOSIX/POSIXProcessControl.cpp b/Engine/source/platformPOSIX/POSIXProcessControl.cpp index 745240dd5..b8aa34504 100644 --- a/Engine/source/platformPOSIX/POSIXProcessControl.cpp +++ b/Engine/source/platformPOSIX/POSIXProcessControl.cpp @@ -34,6 +34,7 @@ #include #include #include "console/engineAPI.h" +#include "core/util/journal/process.h" #ifndef TORQUE_DEDICATED #include #endif @@ -147,6 +148,11 @@ void ProcessControlInit() //----------------------------------------------------------------------------- void Platform::postQuitMessage(const S32 in_quitVal) { + + Process::requestShutdown(); + return; + + // if we have a window send a quit event, otherwise just force shutdown #if 0 if (x86UNIXState->windowCreated()) @@ -234,4 +240,4 @@ void Platform::restartInstance() */ exit(0); } -#endif \ No newline at end of file +#endif